folder-auth-plugin icon indicating copy to clipboard operation
folder-auth-plugin copied to clipboard

JENKINS-62443 Add Full Name lookup for SIDs

Open skundrik opened this issue 5 years ago • 7 comments

A simple fix to add full name for SID. It looks like this image

skundrik avatar May 25 '20 19:05 skundrik

I don’t think you need to keep the ID just show the full name of its set, have a look at what it looks like when you use the matrix authorization strategy from the matrix-auth plugin

timja avatar May 26 '20 04:05 timja

If I recall correctly, Role Strategy and Matrix Auth load the full names asynchronously using JavaScript. That could keep the page load fast.

@skundrik I'm also working on a new UI in #58 . Maybe we can add this there later?

AbhyudayaSharma avatar May 26 '20 05:05 AbhyudayaSharma

If I recall correctly, Role Strategy and Matrix Auth load the full names asynchronously using JavaScript. That could keep the page load fast.

Relevant code from matrix-auth (shouldn't be blindly copied, likely lots of legacy there):

https://github.com/jenkinsci/matrix-auth-plugin/blob/master/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly#L293

https://github.com/jenkinsci/matrix-auth-plugin/blob/e48fc0e15459676f304638933275bdb9b452e7ec/src/main/java/hudson/security/GlobalMatrixAuthorizationStrategy.java#L226-L229

https://github.com/jenkinsci/matrix-auth-plugin/blob/5f69a9a82a7a2d1e6caf505f67c88e59caaa116c/src/main/java/org/jenkinsci/plugins/matrixauth/AuthorizationContainerDescriptor.java#L125

timja avatar May 26 '20 06:05 timja

If I recall correctly, Role Strategy and Matrix Auth load the full names asynchronously using JavaScript. That could keep the page load fast.

Relevant code from matrix-auth (shouldn't be blindly copied, likely lots of legacy there):

https://github.com/jenkinsci/matrix-auth-plugin/blob/master/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly#L293

https://github.com/jenkinsci/matrix-auth-plugin/blob/e48fc0e15459676f304638933275bdb9b452e7ec/src/main/java/hudson/security/GlobalMatrixAuthorizationStrategy.java#L226-L229

https://github.com/jenkinsci/matrix-auth-plugin/blob/5f69a9a82a7a2d1e6caf505f67c88e59caaa116c/src/main/java/org/jenkinsci/plugins/matrixauth/AuthorizationContainerDescriptor.java#L125

RoleStrategy uses the same method from FormChecker to achieve this.

res0nance avatar May 26 '20 07:05 res0nance

If I recall correctly, Role Strategy and Matrix Auth load the full names asynchronously using JavaScript. That could keep the page load fast.

@skundrik I'm also working on a new UI in #58 . Maybe we can add this there later?

Sure, it makes more sense. I guess I'll have to find something else to work on in the mean time.

skundrik avatar May 26 '20 11:05 skundrik

I don’t think you need to keep the ID just show the full name of its set, have a look at what it looks like when you use the matrix authorization strategy from the matrix-auth plugin

I was wondering about that myself but It might be useful to have some reference to the actual SID in case you have identical full names.

skundrik avatar May 27 '20 20:05 skundrik

I don’t think you need to keep the ID just show the full name of its set, have a look at what it looks like when you use the matrix authorization strategy from the matrix-auth plugin

I was wondering about that myself but It might be useful to have some reference to the actual SID in case you have identical full names.

best to be consistent here I think, it saves space and looks nicer, matrix-auth doesn't show it, you could check the role-strategy plugin if you like to see what that does

timja avatar May 27 '20 21:05 timja