-
Notifications
You must be signed in to change notification settings - Fork 827
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
Add allowedGroups to UserConfig in IdZ configuration #2606
Conversation
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/186503483 The labels on this github issue will be updated when the story is started. |
@klaus-sap here you can see the smells from sonar |
server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimGroupProvisioning.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open
a) combine default and allowed groups. So from understanding, if you have default groups defined, then these entries are automatically part of allowedGroups. So this behaviour should be implemented.
b) Check if the limitation should be really done always or only in Identity Zone NOT EQUAL to 'uaa'
a) commit 6e6ab18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see here new sonar
https://sonarcloud.io/summary/new_code?id=cloudfoundry-identity-parent&pullRequest=2606
smells
not all need to be fixed, but please check them
https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&sinceLeakPeriod=true&pullRequest=2606&id=cloudfoundry-identity-parent
server/src/main/java/org/cloudfoundry/identity/uaa/oauth/UaaAuthorizationRequestManager.java
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimGroupProvisioning.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimGroupProvisioning.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimGroupProvisioning.java
Outdated
Show resolved
Hide resolved
model/src/main/java/org/cloudfoundry/identity/uaa/zone/UserConfig.java
Outdated
Show resolved
Hide resolved
@klaus-sap Please add some scenario tests into you can create an extra zone or stay in default , btw. zone creation https://github.com/cloudfoundry/uaa/blob/develop/uaa/src/test/java/org/cloudfoundry/identity/uaa/integration/util/IntegrationTestUtils.java#L671 Scenario I see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one major concern about the validation only happening at group write time, see inline comments.
And a couple sub-major implementation design comments.
server/src/main/java/org/cloudfoundry/identity/uaa/zone/UserConfigValidator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/zone/UserConfigValidator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/zone/UserConfigValidator.java
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimGroupProvisioning.java
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimGroupProvisioning.java
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimGroupProvisioning.java
Show resolved
Hide resolved
server/src/main/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimGroupProvisioning.java
Show resolved
Hide resolved
The change request has been actually resolved. I am dismissing it as Bruce won't be available for a couple weeks.
@bruce-ricard & I agreed that I would take over this PR review from our side as he will be unavailable for a couple of weeks. I am approving this PR. |
#2505 -> Proposal 3.
We want to add an optional attribute "allowedGroups" to the UserConfig in IdZ configuration. If this attribute is not set (i.e., allowedGroups == null), then all groups are allowed as before. If this attribute contains an array of groups, then only the groups from defaultGroups plus allowedGroups are allowed. All other groups can neither be created nor assigned to users.