-
Notifications
You must be signed in to change notification settings - Fork 46
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
allow internal openid url as issuer #2101
Conversation
📝 WalkthroughWalkthroughThe changes in this pull request introduce a new configuration variable in the Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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
🧹 Outside diff range and nitpick comments (1)
spiffworkflow-backend/src/spiffworkflow_backend/config/default.py (1)
125-125
: LGTM! Consider adding a comment for clarity.The new configuration variable
SPIFFWORKFLOW_BACKEND_OPEN_ID_INTERNAL_URL_IS_VALID_ISSUER
is correctly implemented and aligns with the PR objectives. It allows for flexible configuration of internal URL validation for OpenID.Consider adding a brief comment above this line to explain the purpose of this configuration option, such as:
# Determines whether the internal OpenID URL should be considered a valid token issuer config_from_env("SPIFFWORKFLOW_BACKEND_OPEN_ID_INTERNAL_URL_IS_VALID_ISSUER", default=False)This would enhance code readability and make the configuration's purpose immediately clear to other developers.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- spiffworkflow-backend/src/spiffworkflow_backend/config/default.py (1 hunks)
- spiffworkflow-backend/src/spiffworkflow_backend/services/authentication_service.py (1 hunks)
🧰 Additional context used
🔇 Additional comments (2)
spiffworkflow-backend/src/spiffworkflow_backend/config/default.py (1)
Line range hint
1-268
: Summary: New OpenID configuration option added successfullyThe addition of the
SPIFFWORKFLOW_BACKEND_OPEN_ID_INTERNAL_URL_IS_VALID_ISSUER
configuration variable successfully implements the PR objective of introducing an option to recognize internal OpenID URLs as valid token issuers. This change enhances the flexibility of the OpenID configuration without disrupting the existing structure or other settings.The default value of
False
maintains backwards compatibility, ensuring that existing setups won't be affected unless explicitly configured. This implementation allows for easy enabling of internal URL validation when needed, addressing the potential discrepancies in OpenID token validation mentioned in the PR objectives.spiffworkflow-backend/src/spiffworkflow_backend/services/authentication_service.py (1)
366-375
: Good implementation of configurable issuer validationThe changes enhance the issuer validation logic by including the internal server URL in the list of trusted issuers when
SPIFFWORKFLOW_BACKEND_OPEN_ID_INTERNAL_URL_IS_VALID_ISSUER
is set. This aligns with the PR objectives and is correctly implemented.
set
SPIFFWORKFLOW_BACKEND_OPEN_ID_INTERNAL_URL_IS_VALID_ISSUER=true
in backend configuration to allow the url that backend uses to communicate with itself to be considered a valid openid token issuer. when backend through a browser looks different from backend as it sees itself from within the backend container, this configuration will likely to necessary.Summary by CodeRabbit
New Features
Enhancements