-
Notifications
You must be signed in to change notification settings - Fork 160
feat(jans-linux-setup): update the renamed scopes in role-to-scope mapping #12899
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
Conversation
Signed-off-by: duttarnab <arnab.bdutta@gmail.com>
📝 WalkthroughWalkthroughThis PR updates asset-related permission identifiers in the role-scope-mappings configuration file to follow a consistent naming convention, replacing Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings📚 Learning: 2025-12-22T15:34:36.425ZApplied to files:
📚 Learning: 2025-12-18T12:50:04.709ZApplied to files:
📚 Learning: 2025-12-24T06:56:54.128ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
jans-linux-setup/jans_setup/templates/jans-auth/role-scope-mappings.json (1)
788-807: Update asset permission tags to match the naming convention used throughout the file.The tags for the three asset permissions should be changed from
"jans_asset"to"asset"to maintain consistency with the pattern used for all other permissions in this file. Every other permission entry uses tags that match the service name without the "jans_" prefix (e.g.,"attributes","scopes","scripts","clients", etc.), while asset permissions are the only ones using the"jans_asset"prefix.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
jans-linux-setup/jans_setup/templates/jans-auth/role-scope-mappings.json
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: pujavs
Repo: JanssenProject/jans PR: 12736
File: jans-config-api/plugins/jans-link-plugin/src/main/java/io/jans/configapi/plugin/link/util/Constants.java:16-17
Timestamp: 2025-12-22T15:34:36.425Z
Learning: In the Jans project's config-api component, there is an intentional shift in OAuth scope URL naming convention to exclude the "jans-" prefix from scope identifiers. Scope URLs like `https://jans.io/oauth/config/link.admin` (without "jans-link") are preferred over `https://jans.io/oauth/config/jans-link.admin`. This is part of a deliberate renaming effort to exclude the project name from scope names.
📚 Learning: 2025-12-22T15:34:36.425Z
Learnt from: pujavs
Repo: JanssenProject/jans PR: 12736
File: jans-config-api/plugins/jans-link-plugin/src/main/java/io/jans/configapi/plugin/link/util/Constants.java:16-17
Timestamp: 2025-12-22T15:34:36.425Z
Learning: In the Jans project's config-api component, there is an intentional shift in OAuth scope URL naming convention to exclude the "jans-" prefix from scope identifiers. Scope URLs like `https://jans.io/oauth/config/link.admin` (without "jans-link") are preferred over `https://jans.io/oauth/config/jans-link.admin`. This is part of a deliberate renaming effort to exclude the project name from scope names.
Applied to files:
jans-linux-setup/jans_setup/templates/jans-auth/role-scope-mappings.json
📚 Learning: 2025-12-18T12:50:04.709Z
Learnt from: pujavs
Repo: JanssenProject/jans PR: 12736
File: jans-config-api/docs/jans-config-api-swagger.yaml:0-0
Timestamp: 2025-12-18T12:50:04.709Z
Learning: In the Jans project's jans-config-api component, the scope `https://jans.io/auth/ssa.admin` is specified by the jans-auth component for SSA (Software Statement Assertion) endpoints and is out of scope for the Config API.
Applied to files:
jans-linux-setup/jans_setup/templates/jans-auth/role-scope-mappings.json
📚 Learning: 2025-12-24T06:56:54.128Z
Learnt from: pujavs
Repo: JanssenProject/jans PR: 12736
File: jans-config-api/profiles/local/test.properties:2-2
Timestamp: 2025-12-24T06:56:54.128Z
Learning: In jans-config-api test configuration files (like test.properties), the scopes `https://jans.io/auth/ssa.admin`, `https://jans.io/auth/ssa.portal`, and `https://jans.io/auth/ssa.developer` are required for test cases to execute successfully, even though these scopes are managed by the jans-auth component. Test configurations can include scopes from other components when needed for integration testing.
Applied to files:
jans-linux-setup/jans_setup/templates/jans-auth/role-scope-mappings.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: label PR
- GitHub Check: check_pr_for_docs
- GitHub Check: sonar scan (jans-cli-tui)
- GitHub Check: sonar scan (jans-lock)
- GitHub Check: sonar scan (jans-linux-setup)
- GitHub Check: sonar scan (jans-link)
🔇 Additional comments (2)
jans-linux-setup/jans_setup/templates/jans-auth/role-scope-mappings.json (2)
1068-1070: Old asset scope naming patterns must be updated throughout the codebase to match new format.The migration from
jans_asset-(write/delete/read)toasset.(write/readonly/admin)is incomplete. Functional code interraform-provider-jans/jans/jans_asset.gostill uses the old naming (lines 85, 107, 122, 136), along with 14 other files including test configurations and example documentation. Update all references to use the new format consistently.
788-807: This file does not require the OpenID and UMA scope updates mentioned in the original review comment. A comprehensive search of the jans-linux-setup directory found no old hyphenated scope patterns (openid-read, uma-read, etc.). The OpenID and UMA permission URLs that exist in this file already use the correct dot-separated format (e.g.,https://jans.io/oauth/config/openid/clients.readonly,https://jans.io/oauth/config/uma/resources.readonly). All other scopes in the file are consistently formatted. The PR objectives may reference different scope identifiers or configuration files.Likely an incorrect or invalid review comment.



Prepare
Description
Target issue
closes #12898
Implementation Details
Test and Document the changes
Please check the below before submitting your PR. The PR will not be merged if there are no commits that start with
docs:to indicate documentation changes or if the below checklist is not selected.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.