Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancies in Project-based Matrix Authorization Strategy display if oic-auth-plugin is set #482

Open
Lundkvist-prog opened this issue Dec 19, 2024 · 1 comment

Comments

@Lundkvist-prog
Copy link

Jenkins and plugins versions report

Jenkins version : 2.479.2
oic-auth-plugin version: 4.438.v6e62f6782770
matrix-auth version: 3.2.3

What Operating System are you using (both controller, and any agents involved in the problem)?

RHEL8

Reproduction steps

  1. Set and configure oic-auth-plugin as security realm.
  2. Set Project-based Matrix Authorization Strategy for authorization.
  3. Click on "Add user..." button in the Project-based Matrix Authorization Strategy panel.
  4. Enter 'User ID' of an existing user in the Jenkins database.
  5. Click OK.
  6. Click on "Add user..." button in the Project-based Matrix Authorization Strategy panel.
  7. Enter 'User ID' of a non-existing user in the Jenkins database.
  8. Click OK.

Expected Results

  1. If a user, that does not exist in the Jenkins database, is added into the matrix, its row in the 'User/group' column will be displayed in red and with strikethrough e.g. "nonExistingUser" in the screenshot below.
  2. If a user, that exists in the Jenkins database, is added into the matrix, its row in the 'User/group' column will be displayed default, in black e.g. "ExistingUser" in the screenshot below.
  3. If an user is added into the matrix, its row in the 'User/group' column will also display a dedicated icon.
  4. If a user is added into the matrix, its row in the 'User/group' column will display the user's 'Name'.

Image

Actual Results

  1. If a user, that does not exist in Jenkins database, is added into the matrix, its row in the 'User/group' column will be displayed in grey and without strikethrough e.g. "nonExistingUser" in the screenshot below.
  2. If a user, that exists in the Jenkins database, is added into the matrix, its row in the 'User/group' column will be displayed in grey e.g. "ExistingUser" in the screenshot below.
  3. If an user is added into the matrix, its row in the 'User/group' column will not display any icons.
  4. If a user is added into the matrix, its row in the 'User/group' column will display the user's 'User ID', instead of 'Name'.

Image

Anything else?

I was no sure whether to make this a feature request or a bug. I've ultimately landed in a bug, because the change of behaviour regarding the matrix only occurs when using oic-auth-plugin as security realm. The reproduction steps shows an example with adding a user i.e. using "Add user..." button but the same behavior can be reproduced with adding a group i.e. using "Add group...".

Are you interested in contributing a fix?

No response

@eva-mueller-coremedia
Copy link
Contributor

I can reproduce this on a Jenkins 2.462.1 server which does not have the oic-auth-plugin installed => This is not oic-auth-plugin related.

This seem to be a bug(?) in the https://plugins.jenkins.io/matrix-auth/ plugin (I use version 3.2.3) - Maybe related to jenkinsci/matrix-auth-plugin#147?

There, they switched the usage from return FormValidation.okWithMarkup to FormValidation.respond which seem to behave differently: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/util/FormValidation.java#L267

Please report the bug there...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants