Skip to content

chore: add callback URL for swagger-ui - #2514

Merged
ctron merged 1 commit into
guacsec:mainfrom
matejnesuta:redirect-url
Jul 15, 2026
Merged

chore: add callback URL for swagger-ui#2514
ctron merged 1 commit into
guacsec:mainfrom
matejnesuta:redirect-url

Conversation

@matejnesuta

@matejnesuta matejnesuta commented Jul 14, 2026

Copy link
Copy Markdown

When trying to login using the TPA 3.x swagger-ui web interface, the /swagger-ui/oauth2-redirect.html path is used as a redirect. However, Cognito does not recognize this URL by default. This fixes the issue.

@sourcery-ai

sourcery-ai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds the Swagger UI OAuth2 redirect callback URL to the Cognito user pool client’s allowed callback URLs for the Trustify admin example.

Sequence diagram for Swagger UI OAuth2 redirect callback integration

sequenceDiagram
  actor AdminUser
  participant SwaggerUI
  participant CognitoUserPoolClient

  AdminUser->>SwaggerUI: open swagger-ui
  SwaggerUI->>CognitoUserPoolClient: authorize (callback swagger-ui/oauth2-redirect.html)
  CognitoUserPoolClient-->>AdminUser: redirect to swagger-ui/oauth2-redirect.html with code
  AdminUser->>SwaggerUI: GET swagger-ui/oauth2-redirect.html
  SwaggerUI->>CognitoUserPoolClient: token request with code
  CognitoUserPoolClient-->>SwaggerUI: access token
Loading

File-Level Changes

Change Details Files
Extend Cognito user pool client configuration to include Swagger UI OAuth2 redirect as an allowed callback URL.
  • Add swagger-ui OAuth2 redirect path to the callback_urls list for the frontend Cognito user pool client
  • Keep existing console and OpenAPI OAuth receiver callback URLs unchanged
docs/book/modules/admin/examples/trustify/sso.tf

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@matejnesuta
matejnesuta requested a review from ctron July 14, 2026 21:24
@matejnesuta matejnesuta added the backport release/0.5.z Backport (0.5.z) label Jul 14, 2026
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.69%. Comparing base (d4ebf5c) to head (483aff2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2514      +/-   ##
==========================================
+ Coverage   71.68%   71.69%   +0.01%     
==========================================
  Files         456      456              
  Lines       27673    27673              
  Branches    27673    27673              
==========================================
+ Hits        19837    19841       +4     
+ Misses       6692     6683       -9     
- Partials     1144     1149       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ctron
ctron added this pull request to the merge queue Jul 15, 2026
Merged via the queue into guacsec:main with commit e134a93 Jul 15, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Trustify Jul 15, 2026
@trustify-ci-bot

Copy link
Copy Markdown

Successfully created backport PR for release/0.5.z:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release/0.5.z Backport (0.5.z)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants