Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[full-ci] feat: implement OIDC authentication option#1676

Merged
v-scharf merged 2 commits into
mainfrom
switchToUsingBearerToken
Oct 27, 2025
Merged

[full-ci] feat: implement OIDC authentication option#1676
v-scharf merged 2 commits into
mainfrom
switchToUsingBearerToken

Conversation

@v-scharf

@v-scharf v-scharf commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

New Features

  • OIDC login Support: Tests can now use bearer token authentication by setting USE_BEARER_TOKEN=true environment variable
  • Tokens are cached per user to avoid regenerating on each request
  • Expired tokens are refreshed using refresh tokens - need for admin (token TTL = 5min, after refresh token)

Usage

Enable bearer token authentication in tests:
USE_BEARER_TOKEN=true make test-acceptance-api BEHAT_FEATURE=tests/acceptance/features/..

I decided to use the USE_BEARER_TOKEN variable first.
Basic Auth remains the default for now.
Once all tests work with OIDC, I’ll make it the default authentication method.

Improvements

  • During debugging, I noticed that after creating a user (we check 201), we additionally make a GET request to check for the user's existence, which I consider unnecessary. I deleted it
  • reworked creating multiple users methods to using HttpRequestHelper->sendRequest()
  • checking that share is syncing in some tests (were failed in CI)
  • adjusted setup in Ci for multitenancy tests and updated description how to run tests localy multiTenancyTests #1313 (comment)

@v-scharf v-scharf marked this pull request as draft October 20, 2025 13:02
@v-scharf v-scharf force-pushed the switchToUsingBearerToken branch from 493efab to 7a266a6 Compare October 21, 2025 08:29
@v-scharf v-scharf marked this pull request as ready for review October 22, 2025 05:21
@micbar micbar force-pushed the switchToUsingBearerToken branch from 21289ee to 2984c5d Compare October 22, 2025 08:55
@v-scharf v-scharf force-pushed the switchToUsingBearerToken branch from 8fd121a to faf2e8f Compare October 22, 2025 10:39

@rhafer rhafer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me. Just a question related to the refresh tokens and the requested scopes.

Comment thread tests/acceptance/TestHelpers/TokenHelper.php Outdated
@v-scharf v-scharf force-pushed the switchToUsingBearerToken branch from faf2e8f to 8e3e94a Compare October 24, 2025 11:25
@v-scharf v-scharf changed the title feat: implement OIDC authentication option [full-ci] feat: implement OIDC authentication option Oct 24, 2025
Comment thread tests/acceptance/TestHelpers/TokenHelper.php Outdated
Comment thread tests/acceptance/TestHelpers/TokenHelper.php Outdated
@v-scharf v-scharf requested review from rhafer and saw-jan October 27, 2025 08:00
Comment thread tests/acceptance/TestHelpers/TokenHelper.php Outdated
@v-scharf v-scharf requested a review from rhafer October 27, 2025 08:32
@v-scharf v-scharf force-pushed the switchToUsingBearerToken branch from 83c3676 to d135f7c Compare October 27, 2025 08:41

@saw-jan saw-jan 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.

others look good

Comment thread tests/acceptance/bootstrap/FeatureContext.php Outdated
Comment thread tests/acceptance/bootstrap/GraphContext.php Outdated
@v-scharf v-scharf force-pushed the switchToUsingBearerToken branch from 54de0f4 to 50aa7f3 Compare October 27, 2025 09:49
@v-scharf v-scharf merged commit f04f6ad into main Oct 27, 2025
99 checks passed
@v-scharf v-scharf deleted the switchToUsingBearerToken branch October 27, 2025 10:17
@openclouders openclouders mentioned this pull request Oct 27, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants