-
Notifications
You must be signed in to change notification settings - Fork 22
feat(admin-ui): make page UI for cedarling configuration #2378
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
📝 WalkthroughWalkthroughAdds a Cedarling admin configuration page and translations, registers an apiConfig Redux slice and audit resource, updates plugin menu/routes, simplifies mapping UI, and removes several legacy role/permission components and their tests. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant UI as CedarlingConfigPage
participant Auth as Authorization
participant API as AdminUI Config API
participant Sync as RoleMapping Sync
participant Store as QueryCache
participant Audit as AuditService
User->>UI: Open page / Submit form
UI->>Auth: authorize READ/WRITE/DELETE
alt unauthorized
Auth-->>UI: deny
UI-->>User: show permission error
else authorized
UI->>API: editAdminuiConf(payload)
API-->>UI: updated config
UI->>Store: invalidate adminui config query
UI->>Audit: log ADMIN_UI_CEDARLING_CONFIG (update)
UI->>Sync: trigger role-to-scope sync
Sync-->>UI: ack/result
UI-->>User: show success or error
end
User->>UI: Click "Set remote default"
UI->>API: setRemotePolicyStoreAsDefault()
API-->>UI: result
UI->>Audit: log ADMIN_UI_CEDARLING_CONFIG (set default)
UI-->>User: show success/error
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Possibly related issues
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (5)📓 Common learnings📚 Learning: 2025-11-07T12:17:39.857ZApplied to files:
📚 Learning: 2025-11-07T12:55:26.241ZApplied to files:
📚 Learning: 2025-11-10T14:18:58.310ZApplied to files:
📚 Learning: 2025-11-05T19:57:35.143ZApplied to files:
🧬 Code graph analysis (1)admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx (4)
🔇 Additional comments (6)
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 |
|
I think we should make another PR for Cedarling integration. Otherwise, there will be big code changes. |
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: 11
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (8)
admin-ui/app/locales/en/translation.json(4 hunks)admin-ui/app/locales/es/translation.json(4 hunks)admin-ui/app/locales/fr/translation.json(4 hunks)admin-ui/app/locales/pt/translation.json(4 hunks)admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx(1 hunks)admin-ui/plugins/admin/plugin-metadata.ts(5 hunks)admin-ui/plugins/admin/redux/audit/Resources.tsx(1 hunks)admin-ui/plugins/admin/redux/features/apiConfigSlice.js(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx (3)
admin-ui/app/utils/AuditLogger.ts (1)
logAudit(68-68)admin-ui/plugins/admin/components/MAU/MauGraph.js (1)
initPermissions(36-38)admin-ui/app/utils/PermChecker.ts (3)
PROPERTIES_READ(3-3)PROPERTIES_WRITE(4-4)PROPERTIES_DELETE(5-5)
admin-ui/plugins/admin/plugin-metadata.ts (1)
admin-ui/app/utils/PermChecker.ts (1)
MAPPING_READ(26-27)
|
Caution Docstrings generation - FAILED No docstrings were generated. |
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: 9
♻️ Duplicate comments (2)
admin-ui/plugins/admin/redux/features/apiConfigSlice.js (1)
45-46: Remove non-standard state export.Exporting slice.state leaks initialState and confuses consumers. Use selectors instead.
-export const { actions, reducer, state } = apiConfigSlice +export const { actions, reducer } = apiConfigSliceadmin-ui/plugins/admin/plugin-metadata.ts (1)
100-104: Align Cedarling menu permission with page requirements.Gate on PROPERTIES_READ to avoid immediate auth failure on navigation.
- permission: MAPPING_READ, + permission: PROPERTIES_READ,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
admin-ui/app/locales/en/translation.json(4 hunks)admin-ui/app/locales/es/translation.json(4 hunks)admin-ui/app/locales/fr/translation.json(4 hunks)admin-ui/app/locales/pt/translation.json(4 hunks)admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx(1 hunks)admin-ui/plugins/admin/plugin-metadata.ts(5 hunks)admin-ui/plugins/admin/redux/features/apiConfigSlice.js(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
admin-ui/plugins/admin/plugin-metadata.ts (1)
admin-ui/app/utils/PermChecker.ts (2)
MAPPING_READ(26-27)PROPERTIES_READ(3-3)
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx (3)
admin-ui/app/utils/AuditLogger.ts (1)
logAudit(68-68)admin-ui/plugins/admin/components/MAU/MauGraph.js (1)
initPermissions(36-38)admin-ui/app/utils/PermChecker.ts (3)
PROPERTIES_READ(3-3)PROPERTIES_WRITE(4-4)PROPERTIES_DELETE(5-5)
🔇 Additional comments (12)
admin-ui/app/locales/pt/translation.json (2)
65-67: LGTM: menu entry added.Cedarling menu key and placement look consistent across locales.
652-655: LGTM: Cedarling config keys present and consistent.Fields auiPolicyStoreUrl/configApiPolicyStoreUrl and documentation.cedarlingConfig.note/useRemotePolicyStore match the component’s lookups.
Also applies to: 857-857, 1590-1596
admin-ui/plugins/admin/plugin-metadata.ts (1)
211-211: Reducer registration duplication check.apiConfigReducer is registered here; ensure the slice file does not also register itself to prevent duplicates. See suggested change in apiConfigSlice.js.
admin-ui/app/locales/fr/translation.json (1)
657-660: LGTM: keys match component usage.New fields and documentation keys align with CedarlingConfigPage lookups.
Also applies to: 869-870, 1597-1602
admin-ui/app/locales/es/translation.json (4)
623-625: ✓ Looks good.The three new field translation keys are properly added with clear Spanish translations. No issues detected.
658-659: ✓ Menu entries are consistent.The menu dropdown additions for "mapping" and "cedarlingConfig" with their Spanish translations are properly placed and consistent with the English locale.
971-971: ✓ Title translation is appropriate.The cedarling_config title with Spanish translation follows the established pattern.
1741-1747: The review comment is incorrect.
useRemotePolicyStoreis intentionally camelCase because it's a field name reference that maps to the actual configuration field used in the codebase. This is confirmed by:
- Redux state reference in
apiConfigSlice.js(line 27):useRemotePolicyStore: trueis a state field- Component usage in
CedarlingConfigPage.tsx(line 178): The tooltip explicitly references it asdoc_entry={'useRemotePolicyStore'}, which must match the actual field nameThe other keys (
title,point1,point2,note) are UI descriptive strings, not field references, so their lowercase naming doesn't apply touseRemotePolicyStore. The naming is consistent across all locale files (en, fr, pt, es) and serves a functional purpose.Likely an incorrect or invalid review comment.
admin-ui/app/locales/en/translation.json (4)
623-625: ✓ Field translations are clear.The three new field keys with English translations are properly formatted and consistent with their Spanish counterparts.
658-659: ✓ Menu entries match Spanish locale.The security dropdown menu additions are properly formatted and consistent with the Spanish translation file.
978-978: ✓ Title translation is clear.The cedarling_config title follows the established pattern consistently.
1748-1754: No action required - review comment is incorrect.The
useRemotePolicyStorekey uses camelCase intentionally because it references the actual configuration field name defined inapiConfigSlice.js(line 27) and used inCedarlingConfigPage.tsx(lines 59, 178). The tooltip lookup explicitly usesdoc_entry={'useRemotePolicyStore'}to retrieve the translation, confirming the naming is intentional and necessary. Renaming touse_remote_policy_storewould break this connection to the backend configuration field. This naming pattern is consistent across all four locale files (en, es, fr, pt).Likely an incorrect or invalid review comment.
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
Outdated
Show resolved
Hide resolved
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
Outdated
Show resolved
Hide resolved
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
Outdated
Show resolved
Hide resolved
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
admin-ui/app/locales/en/translation.json(4 hunks)admin-ui/app/locales/fr/translation.json(4 hunks)admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx(1 hunks)admin-ui/plugins/admin/redux/audit/Resources.tsx(1 hunks)admin-ui/plugins/admin/redux/features/apiConfigSlice.js(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx (3)
admin-ui/app/utils/AuditLogger.ts (1)
logAudit(68-68)admin-ui/plugins/admin/redux/audit/Resources.tsx (1)
ADMIN_UI_CONFIG(6-6)admin-ui/app/utils/PermChecker.ts (3)
PROPERTIES_READ(3-3)PROPERTIES_WRITE(4-4)PROPERTIES_DELETE(5-5)
duttarnab
left a comment
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.
please see inline comments
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: 2
♻️ Duplicate comments (1)
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx (1)
156-161: Add auiConfig to useEffect dependency array.The effect reads
auiConfigbut only includesisSuccessin the dependency array. This violates React's exhaustive-deps rule and can cause stale closures. IfauiConfigchanges whileisSuccessremainstrue, the effect won't re-run to hydrate the new values, leaving the UI displaying outdated configuration.Apply this diff to fix the dependency array:
useEffect(() => { if (isSuccess) { setAuiPolicyStoreUrl(auiConfig?.auiPolicyStoreUrl || '') setCedarlingPolicyRetrievalPoint(auiConfig?.cedarlingPolicyStoreRetrievalPoint || 'remote') } - }, [isSuccess]) + }, [isSuccess, auiConfig])
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:43-149
Timestamp: 2025-11-07T12:17:39.857Z
Learning: In the Cedarling configuration UI PR (#2378), the `configApiPolicyStoreUrl` field is intentionally out of scope. It relates to config API configuration and will be covered in a separate PR. The current PR focuses on the Admin UI policy store URL (`auiPolicyStoreUrl`).
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:93-104
Timestamp: 2025-11-07T12:55:26.241Z
Learning: In the Cedarling configuration feature (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), the sync role to scopes mappings operation depends on the `auiPolicyStoreUrl`. The backend fetches content from this URL and syncs roles based on the response. Therefore, the audit log for the sync operation should include the `auiPolicyStoreUrl` in its payload to provide proper audit context.
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:107-109
Timestamp: 2025-11-10T14:18:58.310Z
Learning: In the Cedarling configuration page (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), console.error calls should be kept in catch blocks when there are multiple operations in the try block, as they help print the whole error object with details for debugging unexpected errors.
📚 Learning: 2025-11-07T12:17:39.857Z
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:43-149
Timestamp: 2025-11-07T12:17:39.857Z
Learning: In the Cedarling configuration UI PR (#2378), the `configApiPolicyStoreUrl` field is intentionally out of scope. It relates to config API configuration and will be covered in a separate PR. The current PR focuses on the Admin UI policy store URL (`auiPolicyStoreUrl`).
Applied to files:
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
📚 Learning: 2025-11-07T12:55:26.241Z
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:93-104
Timestamp: 2025-11-07T12:55:26.241Z
Learning: In the Cedarling configuration feature (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), the sync role to scopes mappings operation depends on the `auiPolicyStoreUrl`. The backend fetches content from this URL and syncs roles based on the response. Therefore, the audit log for the sync operation should include the `auiPolicyStoreUrl` in its payload to provide proper audit context.
Applied to files:
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
📚 Learning: 2025-11-10T14:18:58.310Z
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:107-109
Timestamp: 2025-11-10T14:18:58.310Z
Learning: In the Cedarling configuration page (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), console.error calls should be kept in catch blocks when there are multiple operations in the try block, as they help print the whole error object with details for debugging unexpected errors.
Applied to files:
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
📚 Learning: 2025-11-05T19:57:35.143Z
Learnt from: faisalsiddique4400
Repo: GluuFederation/flex PR: 2415
File: admin-ui/plugins/auth-server/components/Ssa/SsaAddPage.tsx:148-153
Timestamp: 2025-11-05T19:57:35.143Z
Learning: In the SSA Add page (admin-ui/plugins/auth-server/components/Ssa/SsaAddPage.tsx), the Back button should fall back to '/auth-server/config/ssa' when browser history is unavailable, not '/home/dashboard', as this keeps users in the SSA management context.
Applied to files:
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
🧬 Code graph analysis (1)
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx (4)
admin-ui/plugins/admin/components/Mapping/MappingPage.js (1)
useCedarling(22-22)admin-ui/app/utils/AuditLogger.ts (1)
logAudit(68-68)admin-ui/plugins/admin/redux/audit/Resources.tsx (1)
ADMIN_UI_CEDARLING_CONFIG(5-5)admin-ui/app/utils/PermChecker.ts (3)
PROPERTIES_READ(3-3)PROPERTIES_WRITE(4-4)PROPERTIES_DELETE(5-5)
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: 1
♻️ Duplicate comments (1)
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx (1)
159-164: Add missing dependency to useEffect.The effect reads
auiConfigbut doesn't list it in the dependency array, which violates the React hooks exhaustive-deps rule. This can cause stale closures where the effect uses an outdated version ofauiConfig.Apply this diff:
useEffect(() => { if (isSuccess) { setAuiPolicyStoreUrl(auiConfig?.auiPolicyStoreUrl || '') setCedarlingPolicyRetrievalPoint(auiConfig?.cedarlingPolicyStoreRetrievalPoint || 'remote') } - }, [isSuccess]) + }, [isSuccess, auiConfig])
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:43-149
Timestamp: 2025-11-07T12:17:39.857Z
Learning: In the Cedarling configuration UI PR (#2378), the `configApiPolicyStoreUrl` field is intentionally out of scope. It relates to config API configuration and will be covered in a separate PR. The current PR focuses on the Admin UI policy store URL (`auiPolicyStoreUrl`).
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:93-104
Timestamp: 2025-11-07T12:55:26.241Z
Learning: In the Cedarling configuration feature (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), the sync role to scopes mappings operation depends on the `auiPolicyStoreUrl`. The backend fetches content from this URL and syncs roles based on the response. Therefore, the audit log for the sync operation should include the `auiPolicyStoreUrl` in its payload to provide proper audit context.
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:107-109
Timestamp: 2025-11-10T14:18:58.310Z
Learning: In the Cedarling configuration page (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), console.error calls should be kept in catch blocks when there are multiple operations in the try block, as they help print the whole error object with details for debugging unexpected errors.
📚 Learning: 2025-11-07T12:17:39.857Z
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:43-149
Timestamp: 2025-11-07T12:17:39.857Z
Learning: In the Cedarling configuration UI PR (#2378), the `configApiPolicyStoreUrl` field is intentionally out of scope. It relates to config API configuration and will be covered in a separate PR. The current PR focuses on the Admin UI policy store URL (`auiPolicyStoreUrl`).
Applied to files:
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
📚 Learning: 2025-11-07T12:55:26.241Z
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:93-104
Timestamp: 2025-11-07T12:55:26.241Z
Learning: In the Cedarling configuration feature (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), the sync role to scopes mappings operation depends on the `auiPolicyStoreUrl`. The backend fetches content from this URL and syncs roles based on the response. Therefore, the audit log for the sync operation should include the `auiPolicyStoreUrl` in its payload to provide proper audit context.
Applied to files:
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
📚 Learning: 2025-11-10T14:18:58.310Z
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:107-109
Timestamp: 2025-11-10T14:18:58.310Z
Learning: In the Cedarling configuration page (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), console.error calls should be kept in catch blocks when there are multiple operations in the try block, as they help print the whole error object with details for debugging unexpected errors.
Applied to files:
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
📚 Learning: 2025-11-05T19:57:35.143Z
Learnt from: faisalsiddique4400
Repo: GluuFederation/flex PR: 2415
File: admin-ui/plugins/auth-server/components/Ssa/SsaAddPage.tsx:148-153
Timestamp: 2025-11-05T19:57:35.143Z
Learning: In the SSA Add page (admin-ui/plugins/auth-server/components/Ssa/SsaAddPage.tsx), the Back button should fall back to '/auth-server/config/ssa' when browser history is unavailable, not '/home/dashboard', as this keeps users in the SSA management context.
Applied to files:
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx
🧬 Code graph analysis (1)
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx (4)
admin-ui/plugins/admin/components/Mapping/MappingPage.js (3)
useCedarling(22-22)useTranslation(20-20)dispatch(19-19)admin-ui/app/utils/AuditLogger.ts (1)
logAudit(68-68)admin-ui/plugins/admin/redux/audit/Resources.tsx (1)
ADMIN_UI_CEDARLING_CONFIG(5-5)admin-ui/app/utils/PermChecker.ts (3)
PROPERTIES_READ(3-3)PROPERTIES_WRITE(4-4)PROPERTIES_DELETE(5-5)
🔇 Additional comments (1)
admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx (1)
154-157: Verify permission gating strategy.The permission checks run on mount but don't gate form rendering. Users without proper permissions will see the form and only encounter errors when attempting actions. Consider whether you want to:
- Show a loading state until permissions are verified
- Conditionally render the form based on permission results
- Disable form controls for users lacking write permissions
If the current behavior is intentional (showing the form to all users), this comment can be disregarded.
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
admin-ui/app/locales/en/translation.json(4 hunks)admin-ui/app/locales/es/translation.json(4 hunks)admin-ui/app/locales/fr/translation.json(4 hunks)admin-ui/app/locales/pt/translation.json(4 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:43-149
Timestamp: 2025-11-07T12:17:39.857Z
Learning: In the Cedarling configuration UI PR (#2378), the `configApiPolicyStoreUrl` field is intentionally out of scope. It relates to config API configuration and will be covered in a separate PR. The current PR focuses on the Admin UI policy store URL (`auiPolicyStoreUrl`).
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:93-104
Timestamp: 2025-11-07T12:55:26.241Z
Learning: In the Cedarling configuration feature (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), the sync role to scopes mappings operation depends on the `auiPolicyStoreUrl`. The backend fetches content from this URL and syncs roles based on the response. Therefore, the audit log for the sync operation should include the `auiPolicyStoreUrl` in its payload to provide proper audit context.
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:107-109
Timestamp: 2025-11-10T14:18:58.310Z
Learning: In the Cedarling configuration page (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), console.error calls should be kept in catch blocks when there are multiple operations in the try block, as they help print the whole error object with details for debugging unexpected errors.
📚 Learning: 2025-11-07T12:17:39.857Z
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:43-149
Timestamp: 2025-11-07T12:17:39.857Z
Learning: In the Cedarling configuration UI PR (#2378), the `configApiPolicyStoreUrl` field is intentionally out of scope. It relates to config API configuration and will be covered in a separate PR. The current PR focuses on the Admin UI policy store URL (`auiPolicyStoreUrl`).
Applied to files:
admin-ui/app/locales/fr/translation.jsonadmin-ui/app/locales/pt/translation.jsonadmin-ui/app/locales/en/translation.jsonadmin-ui/app/locales/es/translation.json
📚 Learning: 2025-11-07T12:55:26.241Z
Learnt from: kdhttps
Repo: GluuFederation/flex PR: 2378
File: admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx:93-104
Timestamp: 2025-11-07T12:55:26.241Z
Learning: In the Cedarling configuration feature (admin-ui/plugins/admin/components/Cedarling/CedarlingConfigPage.tsx), the sync role to scopes mappings operation depends on the `auiPolicyStoreUrl`. The backend fetches content from this URL and syncs roles based on the response. Therefore, the audit log for the sync operation should include the `auiPolicyStoreUrl` in its payload to provide proper audit context.
Applied to files:
admin-ui/app/locales/fr/translation.jsonadmin-ui/app/locales/en/translation.json
🔇 Additional comments (3)
admin-ui/app/locales/pt/translation.json (1)
1592-1603: Ensure Portuguese translations match English baseline and address incomplete sentence in note field.The cedarlingConfig section in Portuguese should align with the English file (lines 1750-1761). Line 1596 ("note" field) appears incomplete in the context: it ends with "através do Agama Lab." but may need to specify what "through Agama Lab" refers to in the full context. Also verify:
- Point1 (line 1594): Should include "de amostra" (sample) to match English's "sample project" detail
- Terminology: Confirm "Padrão" (Default) and "Modo Padrão" usage aligns with the English "Default mode" / "Local mode" terminology established in learnings
- Structure: Verify note_prefix/note_suffix values at lines 1601-1602 match English equivalents
Based on learnings, the useRemotePolicyStore field should clarify whether "Default" mode means local or remote policy store. Confirm Portuguese line 1597 correctly conveys: when set to Default/Local mode, policies are stored locally on Admin-UI Server and used for Cedarling authorization.
admin-ui/app/locales/en/translation.json (2)
1750-1761: Verify cedarlingConfig note field is complete and clarify "Default mode" terminology per established learnings.Line 1754 (cedarlingConfig.note) currently reads: "Note: This will help you to create your own cedarling project. You can update roles and permissions using"
This sentence appears incomplete—it ends with "using" without specifying the mechanism (e.g., "using Agama Lab" or "using the refresh button"). The Portuguese translation suggests the intent is "through Agama Lab", so ensure the English version is similarly complete.
Additionally, line 1755 (useRemotePolicyStore) references "Default mode" but per the retrieved learnings, this should explicitly clarify that "Default" now means "Local mode" (policies stored locally on Admin-UI server). The current wording "If set to Default, it will use the Admin-UI storage" implies this, but should be more explicit to prevent user confusion between remote and local storage modes.
Suggested clarification for line 1755:
- "useRemotePolicyStore": "It is recommended to set it to Default for production. If set to Default, it will use the Admin-UI storage for Cedarling authorization. Enable Default mode and use the refresh button to store or update GitHub policies on the Admin-UI Server.", + "useRemotePolicyStore": "It is recommended to enable Local mode (Default) for production. In Local mode, policies are stored on the Admin-UI Server and used for Cedarling authorization. Use the refresh button to sync or update policies from the configured remote URL.",Confirm with the PR author that the terminology change from "Default mode" to "Local mode" has been finalized, and verify the note field intent per the learnings on sync operations.
660-661: Verify consistency of "mapping" key across localization files.Line 660 updates
menus.securityDropdown.mappingfrom an implied previous value to"Roles and Permissions". Ensure this key name and value are consistently applied across all localization files (es, fr, pt). The value change from "Mapping" to "Roles and Permissions" should be verified to avoid breaking any hardcoded references in the UI code that depend on the previous English value.Search the codebase to confirm that no UI code uses the old menu label value for conditional logic or comparisons.
duttarnab
left a comment
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.
|




close #2313
Summary by CodeRabbit
New Features
Changes
Removed
Documentation