Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Use the upstream openshift-login plugin #4608

Closed
piyush-garg opened this issue Dec 4, 2018 · 1 comment · Fixed by fabric8io/openshift-jenkins-s2i-config#234 or fabric8-services/fabric8-tenant#748

Comments

@piyush-garg
Copy link
Collaborator

Right now, we are using(https://github.com/fabric8io/openshift-jenkins-s2i-config/blob/master/plugins/openshift-login.jpi) the fork(https://github.com/fabric8-jenkins/jenkins-openshift-login-plugin) of upstream login plugin(https://github.com/openshift/jenkins-openshift-login-plugin) in our Jenkins image for a single change(fabric8-jenkins/jenkins-openshift-login-plugin@3c21a25).

We need to do rebase, build and update sometime according to the patches required for Jenkins version.

Previously this (Role's ACL) was not configurable but now from the upstream release version v1.0.10, this has been made configurable. PR which implements this is openshift/jenkins-openshift-login-plugin#45

You need to add a configmap named openshift-jenkins-login-plugin-config which contains info about which ACL will be assigned to which role and so on like

data:
    Credentials-Create: admin
    Credentials-Delete: admin
    Credentials-ManageDomains: admin
    Credentials-Update: admin
    Credentials-View: admin,edit,view
    Job-Build: admin,edit
    Job-Cancel: admin,edit
    Job-Configure: admin,edit
    Job-Create: admin,edit
    Job-Delete: admin,edit
    Job-Discover: admin,edit,view
    Job-Read: admin,edit,view
    Job-Workspace: admin,edit
    Overall-Administer: admin
    Overall-Read: admin,edit,view
    Overall-RunScripts: admin,edit
    Run-Delete: admin
    Run-Update: admin
    SCM-Tag: admin,edit
    Slave-Configure: admin
    Slave-Delete: admin
    View-Configure: admin
    View-Create: admin
    View-Delete: admin

More details in README.md here https://github.com/openshift/jenkins-openshift-login-plugin#openshift-role-to-jenkins-permission-mapping

Task is to move from fork to upstream login plugin

@waveywaves
Copy link
Collaborator

Have opened the following PRs to supplement this one.
fabric8-services/fabric8-tenant#748
fabric8io/openshift-jenkins-s2i-config#234

waveywaves added a commit to waveywaves/fabric8-tenant that referenced this issue Feb 15, 2019
This will add a new configmap in jenkins namespace for
openshift login plugin.

Previously there were default roles in openshift-login plugin
and they can't be configured. Because of that we were using
a fork of upstream login plugin with roles configuration
according to our use case.

Now, a patch has been added in upstream login plugin through
which we can configure roles by providing a configmap

This patch will add the same configmap which will be used
by openshift-login plugin to configure roles.
We will deprecate our fork of login plugin and will move to
upstream version.

From image, we have removed our fork binary and used upstream
using this patch
fabric8io/openshift-jenkins-s2i-config#234

This will fix openshiftio/openshift.io#4608
waveywaves added a commit to waveywaves/openshift-jenkins-s2i-config that referenced this issue Feb 15, 2019
This patch will delete the openshift-login plugin binary of
our fork so that we can use the upstream openshift-login
plugin.
Add openshift-login plugin to plugins.txt becuase we need
openshift-login plugin version 1.0.16 as opposed to
the version coming from base image.

This will fix openshiftio/openshift.io#4608
piyush-garg pushed a commit to fabric8io/openshift-jenkins-s2i-config that referenced this issue Feb 15, 2019
This patch will delete the openshift-login plugin binary of
our fork so that we can use the upstream openshift-login
plugin.
Add openshift-login plugin to plugins.txt becuase we need
openshift-login plugin version 1.0.16 as opposed to
the version coming from base image.

This will fix openshiftio/openshift.io#4608
piyush-garg pushed a commit to fabric8-services/fabric8-tenant that referenced this issue Feb 15, 2019
This will add a new configmap in jenkins namespace for
openshift login plugin.

Previously there were default roles in openshift-login plugin
and they can't be configured. Because of that we were using
a fork of upstream login plugin with roles configuration
according to our use case.

Now, a patch has been added in upstream login plugin through
which we can configure roles by providing a configmap

This patch will add the same configmap which will be used
by openshift-login plugin to configure roles.
We will deprecate our fork of login plugin and will move to
upstream version.

From image, we have removed our fork binary and used upstream
using this patch
fabric8io/openshift-jenkins-s2i-config#234

This will fix openshiftio/openshift.io#4608
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.