Skip to content
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

Support for OIDC API Auth and OIDC integration tests #16977

Merged
merged 26 commits into from
Jan 2, 2024

Conversation

nuwang
Copy link
Member

@nuwang nuwang commented Nov 3, 2023

This PR adds support for the following:

  1. Support OIDC tokens as a method of authenticating with the Galaxy API #16545
  2. Adds integration tests for OIDC against a live keycloak docker instance
  3. Fixes a failure in the logout endpoint to properly invalid Galaxy's web session

HTTPBearer is displayed as an auth option in the swagger UI.
image

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 23.2 milestone Nov 3, 2023
@nuwang nuwang changed the title Support for OIDC API Auth and OIDC integration tests [WIP] Support for OIDC API Auth and OIDC integration tests Nov 3, 2023
database/info.txt Outdated Show resolved Hide resolved
@nuwang nuwang force-pushed the oidc_api_auth branch 3 times, most recently from 4ed3131 to 273266d Compare November 4, 2023 07:47
@nuwang nuwang force-pushed the oidc_api_auth branch 2 times, most recently from eaade6f to 28a015b Compare November 5, 2023 14:28
@nuwang nuwang changed the title [WIP] Support for OIDC API Auth and OIDC integration tests Support for OIDC API Auth and OIDC integration tests Nov 7, 2023
@madsi1m
Copy link

madsi1m commented Dec 18, 2023

Please Merge, this will help us a lot.

@@ -295,6 +295,13 @@ def by_api_key(self, api_key: str, sa_session=None):
raise exceptions.AuthenticationFailed("Provided API key has expired.")
return provided_key.user

def by_oidc_access_token(self, access_token: str):
if hasattr(self.app, "authnz_manager") and self.app.authnz_manager:
Copy link
Member

Choose a reason for hiding this comment

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

It might be more explicit to find which type of app we need (is it UniverseApplication) with an isinstance check ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it's not great, I've simply followed the pattern used elsewhere. This is because authnz_manager is assigned conditionally even in the UniverseApplication constructor and is undefined by default. This is something that should probably be handled during the proposed refactoring run.

Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

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

Looks really good, can you resolve this conflict @nuwang ?

@martenson martenson modified the milestones: 23.2, 24.0 Dec 18, 2023
@nuwang
Copy link
Member Author

nuwang commented Dec 19, 2023

Thanks for reviewing @mvdbeek. Have fixed the conflict.

# Sets the prefix for OIDC scopes specific to this Galaxy instance.
# If an API call is made against this Galaxy instance using an OIDC bearer token,
# it must include a scope with "<prefix>:*". e.g "https://galaxyproject.org/api:*"
#oidc_scope_prefix: https://galaxyproject.org/api
Copy link
Member

Choose a reason for hiding this comment

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

Is the :* missing here?

Copy link
Member Author

Choose a reason for hiding this comment

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

The config setting should specify only the prefix. The * is the exact scope that's requested, meaning all permissions. That leaves space for future expansion, like perhaps <prefix>:datasets to request access to datasets etc. For now, we only support <prefix>:*

Copy link
Member

Choose a reason for hiding this comment

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

Should then e.g "https://galaxyproject.org/api" be changed to be clear?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've expanded the description a bit. Let me know whether this looks better.

Copy link
Member

Choose a reason for hiding this comment

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

Cool, thanks a lot!

@nuwang nuwang merged commit fe971b2 into galaxyproject:dev Jan 2, 2024
47 of 49 checks passed
@nuwang
Copy link
Member Author

nuwang commented Jan 2, 2024

Thanks all for the comments and feedback.

@nuwang nuwang deleted the oidc_api_auth branch January 2, 2024 13:24
@bgruening
Copy link
Member

Very cool @nuwang!

@mchdiez from Galaxy Spain was also super interested in this functionality.

Happy New Year everyone!

@yvanlebras
Copy link
Contributor

Youhou, it seems also very usefull for our french earth-system/biodiversity/climate Gaia Data project, where we will deploy a keycloack solution who can benefit from this if I am not wrong

@mvdbeek
Copy link
Member

mvdbeek commented Feb 21, 2024

Hmm, I've been looking into adding tests for #17516, but the tests don't look clean:

INFO:     Started server process [38658]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:9500 (Press CTRL+C to quit)
INFO:     127.0.0.1:52158 - "GET / HTTP/1.1" 200 OK
test_driver DEBUG 2024-02-21 12:21:00,436 [pN:main,p:38658,tN:MainThread] Embedded uvicorn web server for galaxy started at 127.0.0.1:9500/
py.warnings WARNING 2024-02-21 12:21:00,683 [pN:main,p:38658,tN:WSGI_0] /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(

requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:00,820 [pN:main,p:38658,tN:WSGI_0] Generated new state 029k0ORcRyeHu0vGGhShJ6bIwbAPS2.
INFO:     127.0.0.1:52159 - "GET /authnz/keycloak/login HTTP/1.1" 200 OK
py.warnings WARNING 2024-02-21 12:21:00,833 [pN:main,p:38658,tN:MainThread] /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(

py.warnings WARNING 2024-02-21 12:21:01,046 [pN:main,p:38658,tN:MainThread] /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(

requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,234 [pN:main,p:38658,tN:WSGI_0] Encoding `client_id` "gxyclient" with `client_secret` as Basic auth credentials.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,235 [pN:main,p:38658,tN:WSGI_0] Requesting url https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token using method POST.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,235 [pN:main,p:38658,tN:WSGI_0] Supplying headers {'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0'} and data {'grant_type': 'authorization_code', 'code': 'ff436d5b-5635-45cc-805a-0f8369b2c1d2.9e7f24a4-79c5-40c8-9809-365aea187c49.52e25e17-fdb7-423a-83ab-90c27711d391', 'redirect_uri': 'http://127.0.0.1:9500/authnz/keycloak/callback'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,235 [pN:main,p:38658,tN:WSGI_0] Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x2c5b0b4d0>, 'verify': False, 'proxies': None, 'cert': None}.
py.warnings WARNING 2024-02-21 12:21:01,242 [pN:main,p:38658,tN:WSGI_0] /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(

requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,279 [pN:main,p:38658,tN:WSGI_0] Request to fetch token completed with status 200.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,279 [pN:main,p:38658,tN:WSGI_0] Request url was https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,279 [pN:main,p:38658,tN:WSGI_0] Request headers were {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0', 'Content-Length': '219', 'Content-Type': 'application/x-www-form-urlencoded'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,279 [pN:main,p:38658,tN:WSGI_0] Request body was grant_type=authorization_code&code=ff436d5b-5635-45cc-805a-0f8369b2c1d2.9e7f24a4-79c5-40c8-9809-365aea187c49.52e25e17-fdb7-423a-83ab-90c27711d391&redirect_uri=http%3A%2F%2F127.0.0.1%3A9500%2Fauthnz%2Fkeycloak%2Fcallback
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,279 [pN:main,p:38658,tN:WSGI_0] Response headers were {'Referrer-Policy': 'no-referrer', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff', 'Pragma': 'no-cache', 'X-XSS-Protection': '1; mode=block', 'Content-Type': 'application/json', 'content-length': '3824'} and content {"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjcsImlhdCI6MTcwODUxNDQ2MSwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiIxOTA4MTQxOS02YjRiLTQyMDUtYjIxYy1hNzM3ODM3Y2Q0MjAiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM5YyIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4e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XdQO7g","not-before-policy":0,"session_state":"9e7f24a4-79c5-40c8-9809-365aea187c49","scope":"openid profile email https://galaxyproject.org/api:*"}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,280 [pN:main,p:38658,tN:WSGI_0] Invoking 0 token response hooks.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,280 [pN:main,p:38658,tN:WSGI_0] Obtained token {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjcsImlhdCI6MTcwODUxNDQ2MSwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiIxOTA4MTQxOS02YjRiLTQyMDUtYjIxYy1hNzM3ODM3Y2Q0MjAiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM5YyIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4eWNsaWVudCIsIm5vbmNlIjoiYmEwZWRjYjAyYjZiZjdmYTc2ODc0OGU0OTJiYWZmMDE2YWI2ZmVhZjNiNGIwNWZkZTk3YjAxMGUxNTNjOTZlNiIsInNlc3Npb25fc3RhdGUiOiI5ZTdmMjRhNC03OWM1LTQwYzgtOTgwOS0zNjVhZWExODdjNDkiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImdhbGF4eS1hY2Nlc3Mtcm9sZSIsIm9mZmxpbmVfYWNjZXNzIiwiYnBhLWFjY2Vzcy1yb2xlIiwiZGVmYXVsdC1yb2xlcy1neHlyZWFsbSIsInVtYV9hdXRob3JpemF0aW9uIl19LCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGV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M2NWFlYTE4N2M0OSIsImF0X2hhc2giOiJCWmJIQW5ZcEtXVDBLczMtZTFjYTlBIiwiYWNyIjoiMSIsInNpZCI6IjllN2YyNGE0LTc5YzUtNDBjOC05ODA5LTM2NWFlYTE4N2M0OSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiVGVzdCBHYWxheHlVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZ3h5dXNlciIsImdpdmVuX25hbWUiOiJUZXN0IiwiZmFtaWx5X25hbWUiOiJHYWxheHlVc2VyIiwiZW1haWwiOiJneHl1c2VyQGdhbGF4eS5vcmcifQ.I1ZSq74V-uwTfSR79KbzkmLbZsJ7ZwQ8t3zSXJCTAxpRtGBpuw1hhShQHP1DB8NjUsuBLQUNKEriIFEFx4SV-3mc2XjaYw4zkXENDhNGkn3U-jWHYjVNyN5wJhx2IYLhP0_e5ltiiCd31vZrp_-XzkPk4iRC1l_iKai31Z72LpZV4vasjmGTd99OcownFw9ehzjnyY4EboprwEtLFrWblToBuN0TkXIDkwoVc9GCS7BOXdK6Y5e1_4O7KJuuQkEcOer010OOiBeNLfe1mA--0YbiqkQb4ctsh_328weYdLUNgLSDwnjxhYkXG4QszXO06oYwIRYXciUwBlYPXdQO7g', 'not-before-policy': 0, 'session_state': '9e7f24a4-79c5-40c8-9809-365aea187c49', 'scope': ['openid', 'profile', 'email', 'https://galaxyproject.org/api:*'], 'expires_at': 1708514467.280378}.
INFO:     127.0.0.1:52159 - "GET /authnz/keycloak/callback?state=029k0ORcRyeHu0vGGhShJ6bIwbAPS2&session_state=9e7f24a4-79c5-40c8-9809-365aea187c49&code=ff436d5b-5635-45cc-805a-0f8369b2c1d2.9e7f24a4-79c5-40c8-9809-365aea187c49.52e25e17-fdb7-423a-83ab-90c27711d391 HTTP/1.1" 302 Found
INFO:     127.0.0.1:52159 - "GET /user/external_ids?notification=Your%20Keycloak%20identity%20has%20been%20linked%20to%20your%20Galaxy%20account. HTTP/1.1" 200 OK
INFO:     127.0.0.1:52169 - "GET /api/users/current HTTP/1.1" 200 OK
PASSEDINFO:     127.0.0.1:52170 - "GET /api/jobs?state=running HTTP/1.1" 200 OK

test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_oidc_login_existing_user requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,446 [pN:main,p:38658,tN:WSGI_0] Generated new state 7l6Fo47IYTarfdWLDb4WXCGFqFYUxa.
INFO:     127.0.0.1:52171 - "GET /authnz/keycloak/login HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,497 [pN:main,p:38658,tN:WSGI_0] Encoding `client_id` "gxyclient" with `client_secret` as Basic auth credentials.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,498 [pN:main,p:38658,tN:WSGI_0] Requesting url https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token using method POST.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,498 [pN:main,p:38658,tN:WSGI_0] Supplying headers {'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0'} and data {'grant_type': 'authorization_code', 'code': '1633679b-60d1-49bf-84af-06b046cbaa0b.af4cbfb9-2239-4d99-bc6f-3fa05aafbfd3.52e25e17-fdb7-423a-83ab-90c27711d391', 'redirect_uri': 'http://127.0.0.1:9500/authnz/keycloak/callback'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,498 [pN:main,p:38658,tN:WSGI_0] Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x2c82fd150>, 'verify': False, 'proxies': None, 'cert': None}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,515 [pN:main,p:38658,tN:WSGI_0] Request to fetch token completed with status 200.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,515 [pN:main,p:38658,tN:WSGI_0] Request url was https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,515 [pN:main,p:38658,tN:WSGI_0] Request headers were {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0', 'Content-Length': '219', 'Content-Type': 'application/x-www-form-urlencoded'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,515 [pN:main,p:38658,tN:WSGI_0] Request body was grant_type=authorization_code&code=1633679b-60d1-49bf-84af-06b046cbaa0b.af4cbfb9-2239-4d99-bc6f-3fa05aafbfd3.52e25e17-fdb7-423a-83ab-90c27711d391&redirect_uri=http%3A%2F%2F127.0.0.1%3A9500%2Fauthnz%2Fkeycloak%2Fcallback
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,515 [pN:main,p:38658,tN:WSGI_0] Response headers were {'Referrer-Policy': 'no-referrer', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff', 'Pragma': 'no-cache', 'X-XSS-Protection': '1; mode=block', 'Content-Type': 'application/json', 'content-length': '3848'} and content {"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjcsImlhdCI6MTcwODUxNDQ2MSwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiJlM2JhODMyNS02YTk3LTQ0YWQtYTVkOC0zNjg2ZWE4Y2Y1NmYiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNG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f2bjnzXpfi5Zv1Nuh3SJtw4iDaeO_OL6i6neDFAq4gfquztTUrcY6jdc7yn8sLeWmf2RRregP2ctT8Y1AX3nBdPDlm-OZkMPm5Q","not-before-policy":0,"session_state":"af4cbfb9-2239-4d99-bc6f-3fa05aafbfd3","scope":"openid profile email https://galaxyproject.org/api:*"}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,515 [pN:main,p:38658,tN:WSGI_0] Invoking 0 token response hooks.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,516 [pN:main,p:38658,tN:WSGI_0] Obtained token {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjcsImlhdCI6MTcwODUxNDQ2MSwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiJlM2JhODMyNS02YTk3LTQ0YWQtYTVkOC0zNjg2ZWE4Y2Y1NmYiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM5YiIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4eWNsaWVudCIsIm5vbmNlIjoiZTMxMzM3NjNkNGI1ZDIzZmYxMWIzNGEyZDMxNTY0M2I4NGU1MDQ0NWI1NmNlNTQ4MDNjNjJlMTNmN2QyMDZhZCIsInNlc3Npb25fc3RhdGUiOiJhZjRjYmZiOS0yMjM5LTRkOTktYmM2Zi0zZmEwNWFhZmJmZDMiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImdhbGF4eS1hY2Nlc3Mtcm9sZSIsIm9mZmxpbmVfYWNjZXNzIiwiZGVmYXVsdC1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wNDQ1YjU2Y2U1NDgwM2M2MmUxM2Y3ZDIwNmFkIiwic2Vzc2lvbl9zdGF0ZSI6ImFmNGNiZmI5LTIyMzktNGQ5OS1iYzZmLTNmYTA1YWFmYmZkMyIsImF0X2hhc2giOiIzNXhMelR6ZUZFYi1lczhGRWVzSDVnIiwiYWNyIjoiMSIsInNpZCI6ImFmNGNiZmI5LTIyMzktNGQ5OS1iYzZmLTNmYTA1YWFmYmZkMyIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiVGVzdCBHYWxheHlVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZ3h5dXNlcl9leGlzdGluZyIsImdpdmVuX25hbWUiOiJUZXN0IiwiZmFtaWx5X25hbWUiOiJHYWxheHlVc2VyIiwiZW1haWwiOiJneHl1c2VyX2V4aXN0aW5nQGdhbGF4eS5vcmcifQ.hOQR9QVAF3Go-CVwksEv6-RuHiCfUOeTpn-ITHitbM-tqrMDuf3efjwI3We-aP1vWQOD1hN84ZSiobahrphg1tOuUJNo_wxFqHtNdD7azjr8ThtdFLCvELNRHf-aFkksVybKMMdkhnZpGPALDvDPOW5n9jrd0rAS0dJuDzCkgZ49mV8gXWPO5SWXwEfmAvfinlW7tHlau0L0nZHPfDOCNV9-Qr7mkkTeXBLQs5q9i5kblIFioL0f2bjnzXpfi5Zv1Nuh3SJtw4iDaeO_OL6i6neDFAq4gfquztTUrcY6jdc7yn8sLeWmf2RRregP2ctT8Y1AX3nBdPDlm-OZkMPm5Q', 'not-before-policy': 0, 'session_state': 'af4cbfb9-2239-4d99-bc6f-3fa05aafbfd3', 'scope': ['openid', 'profile', 'email', 'https://galaxyproject.org/api:*'], 'expires_at': 1708514467.516018}.
galaxy.authnz.custos_authnz INFO 2024-02-21 12:21:01,517 [pN:main,p:38658,tN:WSGI_0] There already exists a user with email [email protected]. To associate this external login, you must first be logged in as that existing account.
INFO:     127.0.0.1:52171 - "GET /authnz/keycloak/callback?state=7l6Fo47IYTarfdWLDb4WXCGFqFYUxa&session_state=af4cbfb9-2239-4d99-bc6f-3fa05aafbfd3&code=1633679b-60d1-49bf-84af-06b046cbaa0b.af4cbfb9-2239-4d99-bc6f-3fa05aafbfd3.52e25e17-fdb7-423a-83ab-90c27711d391 HTTP/1.1" 302 Found
INFO:     127.0.0.1:52171 - "GET /login/start?connect_external_provider=keycloak&[email protected]&connect_external_label=Keycloak HTTP/1.1" 200 OK
INFO:     127.0.0.1:52174 - "GET /api/users/current HTTP/1.1" 400 Bad Request
PASSEDINFO:     127.0.0.1:52175 - "GET /api/jobs?state=running HTTP/1.1" 500 Internal Server Error

test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_oidc_login_account_linkup ERROR:    Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    |     await self.app(scope, receive, send_wrapper)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    |     with collapse_excgroups():
    |   File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    |     await route.handle(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    |     await self.app(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    |     response = await func(request)
    |                ^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    |     raise e
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    |     return await run_in_threadpool(dependant.call, **values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    |     return await anyio.to_thread.run_sync(func, *args)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    |     return await get_async_backend().run_sync_in_worker_thread(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    |     return await future
    |            ^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    |     result = context.run(func, *args)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    |     return self.service.index(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    |     jobs = self.job_manager.index_query(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    |     stmt = stmt.where(Job.user_id == trans.user.id)
    |                                      ^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute 'id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    raise e
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    return self.service.index(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    jobs = self.job_manager.index_query(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    stmt = stmt.where(Job.user_id == trans.user.id)
                                     ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
INFO:     127.0.0.1:52180 - "GET /login/start HTTP/1.1" 200 OK
galaxy.webapps.galaxy.controllers.user DEBUG 2024-02-21 12:21:01,573 [pN:main,p:38658,tN:WSGI_0] trans.app.config.auth_config_file: /Users/mvandenb/tmp/tmpw5j9tgad/tmp7wom9gbq/auth_conf.xml
galaxy.auth.providers.localdb DEBUG 2024-02-21 12:21:01,599 [pN:main,p:38658,tN:WSGI_0] User: [email protected], LOCALDB: True
INFO:     127.0.0.1:52180 - "POST /user/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:52180 - "GET /api/users/current HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,634 [pN:main,p:38658,tN:WSGI_0] Generated new state r1whDy04PgPKt6Lj6Eg9AoVUEtxttt.
INFO:     127.0.0.1:52180 - "GET /authnz/keycloak/login HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,681 [pN:main,p:38658,tN:WSGI_0] Encoding `client_id` "gxyclient" with `client_secret` as Basic auth credentials.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,681 [pN:main,p:38658,tN:WSGI_0] Requesting url https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token using method POST.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,681 [pN:main,p:38658,tN:WSGI_0] Supplying headers {'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0'} and data {'grant_type': 'authorization_code', 'code': '4f7dc104-9e7c-4bf7-9444-45b6c649968c.44baa069-4351-4360-a0f8-08c145c87ebc.52e25e17-fdb7-423a-83ab-90c27711d391', 'redirect_uri': 'http://127.0.0.1:9500/authnz/keycloak/callback'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,681 [pN:main,p:38658,tN:WSGI_0] Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x144ff06d0>, 'verify': False, 'proxies': None, 'cert': None}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,694 [pN:main,p:38658,tN:WSGI_0] Request to fetch token completed with status 200.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,694 [pN:main,p:38658,tN:WSGI_0] Request url was https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,694 [pN:main,p:38658,tN:WSGI_0] Request headers were {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0', 'Content-Length': '219', 'Content-Type': 'application/x-www-form-urlencoded'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,694 [pN:main,p:38658,tN:WSGI_0] Request body was grant_type=authorization_code&code=4f7dc104-9e7c-4bf7-9444-45b6c649968c.44baa069-4351-4360-a0f8-08c145c87ebc.52e25e17-fdb7-423a-83ab-90c27711d391&redirect_uri=http%3A%2F%2F127.0.0.1%3A9500%2Fauthnz%2Fkeycloak%2Fcallback
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,694 [pN:main,p:38658,tN:WSGI_0] Response headers were {'Referrer-Policy': 'no-referrer', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff', 'Pragma': 'no-cache', 'X-XSS-Protection': '1; mode=block', 'Content-Type': 'application/json', 'content-length': '3848'} and content {"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjcsImlhdCI6MTcwODUxNDQ2MSwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiJlZmFmN2UwZi04MzIzLTRjYTAtOWI1NS1hNDU1MTU3NjAxYzciLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5ND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_TTVdFoyuQTV_14hf1cipG_9D5fw8b607brITvgazwys4qQDxy41qxa5CGGKHB0Iah0stJV0TiaVP5uY2x64PHAgngbFkHc8w4MRrqGTew3FS_ofNInEMEATI9J5n9v3tJkCV0VAnoQkvBt3eLeBAT97Jm4_nwe_231tXYeFcyghOD9YvKcGyLvutXtg","not-before-policy":0,"session_state":"44baa069-4351-4360-a0f8-08c145c87ebc","scope":"openid profile email https://galaxyproject.org/api:*"}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,695 [pN:main,p:38658,tN:WSGI_0] Invoking 0 token response hooks.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,695 [pN:main,p:38658,tN:WSGI_0] Obtained token {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjcsImlhdCI6MTcwODUxNDQ2MSwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiJlZmFmN2UwZi04MzIzLTRjYTAtOWI1NS1hNDU1MTU3NjAxYzciLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM5YiIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4eWNsaWVudCIsIm5vbmNlIjoiNTZkOWZhODc3OGM1N2MwZmVjOTJjZDA0NzRhMDAwOTE5Mzg3N2RmZDNlNTVmZGFiMThlNDcwYjQwZDU3NDNiYyIsInNlc3Npb25fc3RhdGUiOiI0NGJhYTA2OS00MzUxLTQzNjAtYTBmOC0wOGMxNDVjODdlYmMiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImdhbGF4eS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iwibm9uY2UiOiI1NmQ5ZmE4Nzc4YzU3YzBmZWM5MmNkMDQ3NGEwMDA5MTkzODc3ZGZkM2U1NWZkYWIxOGU0NzBiNDBkNTc0M2JjIiwic2Vzc2lvbl9zdGF0ZSI6IjQ0YmFhMDY5LTQzNTEtNDM2MC1hMGY4LTA4YzE0NWM4N2ViYyIsImF0X2hhc2giOiJLZ0pFb0o4S0MzNnVyc0VZRXNLOGxRIiwiYWNyIjoiMSIsInNpZCI6IjQ0YmFhMDY5LTQzNTEtNDM2MC1hMGY4LTA4YzE0NWM4N2ViYyIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiVGVzdCBHYWxheHlVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZ3h5dXNlcl9leGlzdGluZyIsImdpdmVuX25hbWUiOiJUZXN0IiwiZmFtaWx5X25hbWUiOiJHYWxheHlVc2VyIiwiZW1haWwiOiJneHl1c2VyX2V4aXN0aW5nQGdhbGF4eS5vcmcifQ.QM8xXuvM7j_-RTfV16VM6r3Yj8opzSMtOHTXPl4_xOGT9Twz-tBZAeISG_0sNlZr8dF1g97x-qhq8YMC_LAedJ3aAdH1tsoEvFShq6-fI2cB2dpDmTKf839VPlACuG26FRcpiO7r1RCHogbkRtgnlrrHyw_TTVdFoyuQTV_14hf1cipG_9D5fw8b607brITvgazwys4qQDxy41qxa5CGGKHB0Iah0stJV0TiaVP5uY2x64PHAgngbFkHc8w4MRrqGTew3FS_ofNInEMEATI9J5n9v3tJkCV0VAnoQkvBt3eLeBAT97Jm4_nwe_231tXYeFcyghOD9YvKcGyLvutXtg', 'not-before-policy': 0, 'session_state': '44baa069-4351-4360-a0f8-08c145c87ebc', 'scope': ['openid', 'profile', 'email', 'https://galaxyproject.org/api:*'], 'expires_at': 1708514467.6951628}.
INFO:     127.0.0.1:52180 - "GET /authnz/keycloak/callback?state=r1whDy04PgPKt6Lj6Eg9AoVUEtxttt&session_state=44baa069-4351-4360-a0f8-08c145c87ebc&code=4f7dc104-9e7c-4bf7-9444-45b6c649968c.44baa069-4351-4360-a0f8-08c145c87ebc.52e25e17-fdb7-423a-83ab-90c27711d391 HTTP/1.1" 302 Found
INFO:     127.0.0.1:52180 - "GET /user/external_ids?notification=Your%20Keycloak%20identity%20has%20been%20linked%20to%20your%20Galaxy%20account. HTTP/1.1" 200 OK
INFO:     127.0.0.1:52180 - "GET /api/users/current HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,731 [pN:main,p:38658,tN:WSGI_0] Generated new state NYL5xfBlvKSyOkJ6zgkCYvYCjUScVC.
INFO:     127.0.0.1:52183 - "GET /authnz/keycloak/login HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,772 [pN:main,p:38658,tN:WSGI_0] Encoding `client_id` "gxyclient" with `client_secret` as Basic auth credentials.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,772 [pN:main,p:38658,tN:WSGI_0] Requesting url https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token using method POST.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,773 [pN:main,p:38658,tN:WSGI_0] Supplying headers {'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0'} and data {'grant_type': 'authorization_code', 'code': '55f2e4e4-9f66-419d-ace3-aad95962f7e2.a2f446ed-9e4c-40eb-89ea-424d14eb97b3.52e25e17-fdb7-423a-83ab-90c27711d391', 'redirect_uri': 'http://127.0.0.1:9500/authnz/keycloak/callback'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,773 [pN:main,p:38658,tN:WSGI_0] Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x2c7307c10>, 'verify': False, 'proxies': None, 'cert': None}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,786 [pN:main,p:38658,tN:WSGI_0] Request to fetch token completed with status 200.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,786 [pN:main,p:38658,tN:WSGI_0] Request url was https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,786 [pN:main,p:38658,tN:WSGI_0] Request headers were {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0', 'Content-Length': '219', 'Content-Type': 'application/x-www-form-urlencoded'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,787 [pN:main,p:38658,tN:WSGI_0] Request body was grant_type=authorization_code&code=55f2e4e4-9f66-419d-ace3-aad95962f7e2.a2f446ed-9e4c-40eb-89ea-424d14eb97b3.52e25e17-fdb7-423a-83ab-90c27711d391&redirect_uri=http%3A%2F%2F127.0.0.1%3A9500%2Fauthnz%2Fkeycloak%2Fcallback
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,787 [pN:main,p:38658,tN:WSGI_0] Response headers were {'Referrer-Policy': 'no-referrer', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff', 'Pragma': 'no-cache', 'X-XSS-Protection': '1; mode=block', 'Content-Type': 'application/json', 'content-length': '3848'} and content {"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjcsImlhdCI6MTcwODUxNDQ2MSwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiJlMTFiZTA1Ny1jMTBkLTQ1YjItOWJmOC05NmU5NzdiOGE0ZWQiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5ND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Lnp_UOGheKWAzSKefTnHMuCB6HzGPo5KguvZwdnw8uwkdRd-jqni7V2hNuaD4GnP8cCCUAgrpHuvOsCFw2wR2QutV1iXNkN2qqnVFbQJ2o1kXRWyrkVIcpjy2uKlBrTHrklJhD2xlUSpdhFPKF00DJXaSdih9wg2PNerRp-9d2Wy5ew5TZFdKBP1w","not-before-policy":0,"session_state":"a2f446ed-9e4c-40eb-89ea-424d14eb97b3","scope":"openid profile email https://galaxyproject.org/api:*"}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,787 [pN:main,p:38658,tN:WSGI_0] Invoking 0 token response hooks.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,787 [pN:main,p:38658,tN:WSGI_0] Obtained token {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjcsImlhdCI6MTcwODUxNDQ2MSwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiJlMTFiZTA1Ny1jMTBkLTQ1YjItOWJmOC05NmU5NzdiOGE0ZWQiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM5YiIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4eWNsaWVudCIsIm5vbmNlIjoiNzRhZDJhNjc4NjE2ZmY5MWUwMGM0MTA1NmYzZTY0ZTk2ZWNmYzM4MDg4M2U2OTQzYjBhNzNlYzRjNGIxMWMyYiIsInNlc3Npb25fc3RhdGUiOiJhMmY0NDZlZC05ZTRjLTQwZWItODllYS00MjRkMTRlYjk3YjMiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7In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IjoiZ3h5Y2xpZW50Iiwibm9uY2UiOiI3NGFkMmE2Nzg2MTZmZjkxZTAwYzQxMDU2ZjNlNjRlOTZlY2ZjMzgwODgzZTY5NDNiMGE3M2VjNGM0YjExYzJiIiwic2Vzc2lvbl9zdGF0ZSI6ImEyZjQ0NmVkLTllNGMtNDBlYi04OWVhLTQyNGQxNGViOTdiMyIsImF0X2hhc2giOiJzTU1jVzBEV1FiN2U5anNGNmg2Q3V3IiwiYWNyIjoiMSIsInNpZCI6ImEyZjQ0NmVkLTllNGMtNDBlYi04OWVhLTQyNGQxNGViOTdiMyIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiVGVzdCBHYWxheHlVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZ3h5dXNlcl9leGlzdGluZyIsImdpdmVuX25hbWUiOiJUZXN0IiwiZmFtaWx5X25hbWUiOiJHYWxheHlVc2VyIiwiZW1haWwiOiJneHl1c2VyX2V4aXN0aW5nQGdhbGF4eS5vcmcifQ.dTbh9v3Umsnk2aKCKze-rvTPpDBUJ_gYTpy4CwY9gBRM8wePNE8nQUYHcyB1nYZ4nff2zaSipbjAw68CXOBz6dWeq1W51SHAKDl5cuiWqA1KhJubX0xPpfvTUnkvvI_qQ9axtr_2Mbtj9lcG-xHYHGlCTqUi3Lnp_UOGheKWAzSKefTnHMuCB6HzGPo5KguvZwdnw8uwkdRd-jqni7V2hNuaD4GnP8cCCUAgrpHuvOsCFw2wR2QutV1iXNkN2qqnVFbQJ2o1kXRWyrkVIcpjy2uKlBrTHrklJhD2xlUSpdhFPKF00DJXaSdih9wg2PNerRp-9d2Wy5ew5TZFdKBP1w', 'not-before-policy': 0, 'session_state': 'a2f446ed-9e4c-40eb-89ea-424d14eb97b3', 'scope': ['openid', 'profile', 'email', 'https://galaxyproject.org/api:*'], 'expires_at': 1708514467.7871628}.
INFO:     127.0.0.1:52183 - "GET /authnz/keycloak/callback?state=NYL5xfBlvKSyOkJ6zgkCYvYCjUScVC&session_state=a2f446ed-9e4c-40eb-89ea-424d14eb97b3&code=55f2e4e4-9f66-419d-ace3-aad95962f7e2.a2f446ed-9e4c-40eb-89ea-424d14eb97b3.52e25e17-fdb7-423a-83ab-90c27711d391 HTTP/1.1" 302 Found
INFO:     127.0.0.1:52183 - "GET / HTTP/1.1" 200 OK
INFO:     127.0.0.1:52183 - "GET /api/users/current HTTP/1.1" 200 OK
PASSEDINFO:     127.0.0.1:52186 - "GET /api/jobs?state=running HTTP/1.1" 200 OK

test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_oidc_logout requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,826 [pN:main,p:38658,tN:WSGI_0] Generated new state mKU7N0W30D3bgyNJwsU00MPdtJDbnj.
INFO:     127.0.0.1:52187 - "GET /authnz/keycloak/login HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,868 [pN:main,p:38658,tN:WSGI_0] Encoding `client_id` "gxyclient" with `client_secret` as Basic auth credentials.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,868 [pN:main,p:38658,tN:WSGI_0] Requesting url https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token using method POST.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,868 [pN:main,p:38658,tN:WSGI_0] Supplying headers {'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0'} and data {'grant_type': 'authorization_code', 'code': '375e06ef-7970-474e-a20a-4fbbc952c507.f613da29-cc32-463b-b8fc-97495d607602.52e25e17-fdb7-423a-83ab-90c27711d391', 'redirect_uri': 'http://127.0.0.1:9500/authnz/keycloak/callback'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,868 [pN:main,p:38658,tN:WSGI_0] Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x2c72744d0>, 'verify': False, 'proxies': None, 'cert': None}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,880 [pN:main,p:38658,tN:WSGI_0] Request to fetch token completed with status 200.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,880 [pN:main,p:38658,tN:WSGI_0] Request url was https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,880 [pN:main,p:38658,tN:WSGI_0] Request headers were {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0', 'Content-Length': '219', 'Content-Type': 'application/x-www-form-urlencoded'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,880 [pN:main,p:38658,tN:WSGI_0] Request body was grant_type=authorization_code&code=375e06ef-7970-474e-a20a-4fbbc952c507.f613da29-cc32-463b-b8fc-97495d607602.52e25e17-fdb7-423a-83ab-90c27711d391&redirect_uri=http%3A%2F%2F127.0.0.1%3A9500%2Fauthnz%2Fkeycloak%2Fcallback
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,880 [pN:main,p:38658,tN:WSGI_0] Response headers were {'Referrer-Policy': 'no-referrer', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff', 'Pragma': 'no-cache', 'X-XSS-Protection': '1; mode=block', 'Content-Type': 'application/json', 'content-length': '3824'} and content {"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjcsImlhdCI6MTcwODUxNDQ2MSwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiI1NjE5Mzc4MS00MDYx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Jua3ZJNjUrv_eRdf2YXKCS0RBX8cVIREKvdv6Y82fLo-XxdeuPmEs9p_pKdA9Hhrs-b6-SgHSvFrcQolOEavenCAjMczndzN50JACfHro9VZxHAFNcCh7wieTP1nqeNxSSJH-gTyEi0GW-jWQS4hUxtwA_xOl1Vft4ATUMpU1VsFAsjeQ_kTABCrZv3lU02Yob1Gmkk80Ow7LnlQJKTBlXZNu4XZE9z77iZx9fRLo-FBIIrA","not-before-policy":0,"session_state":"f613da29-cc32-463b-b8fc-97495d607602","scope":"openid profile email https://galaxyproject.org/api:*"}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,880 [pN:main,p:38658,tN:WSGI_0] Invoking 0 token response hooks.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,880 [pN:main,p:38658,tN:WSGI_0] Obtained token {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjcsImlhdCI6MTcwODUxNDQ2MSwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiI1NjE5Mzc4MS00MDYxLTQwMWEtOWEzOS1jYjM5Y2Q1MDRkNDUiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM5YyIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4eWNsaWVudCIsIm5vbmNlIjoiODg2NjM2OGQwZmRiZTIyMjg0ZjRiYTdhNDRhN2M4MjFjMmJhZTljZDlmZGE2YTZmN2RlOTM1YzIxNGY3OTM4NiIsInNlc3Npb25fc3RhdGUiOiJmNjEzZGEyOS1jYzMyLTQ2M2ItYjhmYy05NzQ5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Q1ZS1iMTBiLThkNjE1MDgyZWM5YyIsInR5cCI6IklEIiwiYXpwIjoiZ3h5Y2xpZW50Iiwibm9uY2UiOiI4ODY2MzY4ZDBmZGJlMjIyODRmNGJhN2E0NGE3YzgyMWMyYmFlOWNkOWZkYTZhNmY3ZGU5MzVjMjE0Zjc5Mzg2Iiwic2Vzc2lvbl9zdGF0ZSI6ImY2MTNkYTI5LWNjMzItNDYzYi1iOGZjLTk3NDk1ZDYwNzYwMiIsImF0X2hhc2giOiJRS1hRa3d2aXNNRVE2UFFxMi05bC1nIiwiYWNyIjoiMSIsInNpZCI6ImY2MTNkYTI5LWNjMzItNDYzYi1iOGZjLTk3NDk1ZDYwNzYwMiIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiVGVzdCBHYWxheHlVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZ3h5dXNlciIsImdpdmVuX25hbWUiOiJUZXN0IiwiZmFtaWx5X25hbWUiOiJHYWxheHlVc2VyIiwiZW1haWwiOiJneHl1c2VyQGdhbGF4eS5vcmcifQ.qanzALBzbAdk6DHpHUA9S5U6xaDZS_AHA98ZjbRlNBkoxEziQpBn7O_dYCTNhh2mBpOpV_x9DgZp2zd7xLFZC9xd5Y7-3fy2gAyM10Jua3ZJNjUrv_eRdf2YXKCS0RBX8cVIREKvdv6Y82fLo-XxdeuPmEs9p_pKdA9Hhrs-b6-SgHSvFrcQolOEavenCAjMczndzN50JACfHro9VZxHAFNcCh7wieTP1nqeNxSSJH-gTyEi0GW-jWQS4hUxtwA_xOl1Vft4ATUMpU1VsFAsjeQ_kTABCrZv3lU02Yob1Gmkk80Ow7LnlQJKTBlXZNu4XZE9z77iZx9fRLo-FBIIrA', 'not-before-policy': 0, 'session_state': 'f613da29-cc32-463b-b8fc-97495d607602', 'scope': ['openid', 'profile', 'email', 'https://galaxyproject.org/api:*'], 'expires_at': 1708514467.880577}.
INFO:     127.0.0.1:52187 - "GET /authnz/keycloak/callback?state=mKU7N0W30D3bgyNJwsU00MPdtJDbnj&session_state=f613da29-cc32-463b-b8fc-97495d607602&code=375e06ef-7970-474e-a20a-4fbbc952c507.f613da29-cc32-463b-b8fc-97495d607602.52e25e17-fdb7-423a-83ab-90c27711d391 HTTP/1.1" 302 Found
INFO:     127.0.0.1:52187 - "GET / HTTP/1.1" 200 OK
INFO:     127.0.0.1:52187 - "GET /api/users/current HTTP/1.1" 200 OK
INFO:     127.0.0.1:52187 - "GET /authnz/logout HTTP/1.1" 302 Found
INFO:     127.0.0.1:52187 - "GET /authnz/keycloak/logout HTTP/1.1" 200 OK
INFO:     127.0.0.1:52187 - "GET /api/users/current HTTP/1.1" 400 Bad Request
PASSEDINFO:     127.0.0.1:52190 - "GET /api/jobs?state=running HTTP/1.1" 500 Internal Server Error

test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_auth_by_access_token_logged_in_once ERROR:    Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    |     await self.app(scope, receive, send_wrapper)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    |     with collapse_excgroups():
    |   File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    |     await route.handle(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    |     await self.app(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    |     response = await func(request)
    |                ^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    |     raise e
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    |     return await run_in_threadpool(dependant.call, **values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    |     return await anyio.to_thread.run_sync(func, *args)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    |     return await get_async_backend().run_sync_in_worker_thread(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    |     return await future
    |            ^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    |     result = context.run(func, *args)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    |     return self.service.index(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    |     jobs = self.job_manager.index_query(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    |     stmt = stmt.where(Job.user_id == trans.user.id)
    |                                      ^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute 'id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    raise e
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    return self.service.index(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    jobs = self.job_manager.index_query(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    stmt = stmt.where(Job.user_id == trans.user.id)
                                     ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,954 [pN:main,p:38658,tN:WSGI_0] Generated new state 7nV8LoTnnpuen5nLRYKRCF3CScmJZ1.
INFO:     127.0.0.1:52191 - "GET /authnz/keycloak/login HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,996 [pN:main,p:38658,tN:WSGI_0] Encoding `client_id` "gxyclient" with `client_secret` as Basic auth credentials.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,996 [pN:main,p:38658,tN:WSGI_0] Requesting url https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token using method POST.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,997 [pN:main,p:38658,tN:WSGI_0] Supplying headers {'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0'} and data {'grant_type': 'authorization_code', 'code': 'ebbdd785-25fe-42d7-9a4e-f0c7e01988b7.4e446df1-37b1-4391-bf1d-8561ccbbb012.52e25e17-fdb7-423a-83ab-90c27711d391', 'redirect_uri': 'http://127.0.0.1:9500/authnz/keycloak/callback'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:01,997 [pN:main,p:38658,tN:WSGI_0] Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x2c723e850>, 'verify': False, 'proxies': None, 'cert': None}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,010 [pN:main,p:38658,tN:WSGI_0] Request to fetch token completed with status 200.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,010 [pN:main,p:38658,tN:WSGI_0] Request url was https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,010 [pN:main,p:38658,tN:WSGI_0] Request headers were {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0', 'Content-Length': '219', 'Content-Type': 'application/x-www-form-urlencoded'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,010 [pN:main,p:38658,tN:WSGI_0] Request body was grant_type=authorization_code&code=ebbdd785-25fe-42d7-9a4e-f0c7e01988b7.4e446df1-37b1-4391-bf1d-8561ccbbb012.52e25e17-fdb7-423a-83ab-90c27711d391&redirect_uri=http%3A%2F%2F127.0.0.1%3A9500%2Fauthnz%2Fkeycloak%2Fcallback
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,010 [pN:main,p:38658,tN:WSGI_0] Response headers were {'Referrer-Policy': 'no-referrer', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff', 'Pragma': 'no-cache', 'X-XSS-Protection': '1; mode=block', 'Content-Type': 'application/json', 'content-length': '3880'} and content {"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjgsImlhdCI6MTcwODUxNDQ2MiwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiI0M2RiMjYxMy0wZDdkLTQ2ZWUtYmNhNS04MzMzNTBiOTY5ODciLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM5ZCIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4eWNsaWVudCIsIm5vbmNlIjoiMDVlZWEwMmYwNmZmMWVjYzhjNDhhNGQ5ZTgxMTg4Z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","not-before-policy":0,"session_state":"4e446df1-37b1-4391-bf1d-8561ccbbb012","scope":"openid profile email https://galaxyproject.org/api:*"}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,010 [pN:main,p:38658,tN:WSGI_0] Invoking 0 token response hooks.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,010 [pN:main,p:38658,tN:WSGI_0] Obtained token {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjgsImlhdCI6MTcwODUxNDQ2MiwiYXV0aF90aW1lIjoxNzA4NTE0NDYxLCJqdGkiOiI0M2RiMjYxMy0wZDdkLTQ2ZWUtYmNhNS04MzMzNTBiOTY5ODciLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM5ZCIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4eWNsaWVudCIsIm5vbmNlIjoiMDVlZWEwMmYwNmZmMWVjYzhjNDhhNGQ5ZTgxMTg4Zjk1YTEzZWJjMTYwNDI2MDg4NjJkMTU3ZWUwYmJjNDEyZSIsInNlc3Npb25fc3RhdGUiOiI0ZTQ0NmRmMS0zN2IxLTQzOTEtYmYxZC04NTYxY2NiYmIwMTIiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImdhbGF4eS1hY2Nlc3Mtcm9sZSIsIm9mZmxpbmVfYWNjZXNzIiwiZGVmYXVsdC1yb2xlcy1neHlyZWFsbSIsInVtYV9hdXRob3JpemF0aW9uIl19LCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIGh0dHBzOi8vZ2FsYX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1iZjFkLTg1NjFjY2JiYjAxMiIsImF0X2hhc2giOiJLOFUzT01RU2xTbjhQMDV4ZmN3TGR3IiwiYWNyIjoiMSIsInNpZCI6IjRlNDQ2ZGYxLTM3YjEtNDM5MS1iZjFkLTg1NjFjY2JiYjAxMiIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiVGVzdCBHYWxheHlVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZ3h5dXNlcl9sb2dnZWRfaW5fb25jZSIsImdpdmVuX25hbWUiOiJUZXN0IiwiZmFtaWx5X25hbWUiOiJHYWxheHlVc2VyIiwiZW1haWwiOiJneHl1c2VyX2xvZ2dlZF9pbl9vbmNlQGdhbGF4eS5vcmcifQ.QZprtR-JS0cG5iL_SKD6QyTsUljgRG1NmB7c-ythvW8hdgyRQoiJjOQV9XNt0xatErkVPvUp2axdrXhqu6wjCK16uvcWEEiIG-Om1mS-fy6oXfpK5dl-0QrUNOFlPfTjUj0tq097PxkYBvzEVnRfEKSRPRwBg5QDyqupfxiZ8m6YxkS9nQ3hINwVrwHHDHjEjkt2_qasobpnO2v6kvPKwj1lHbfIHoLZs-tN8gVcmszUuxGePj_WhCoZAn0O0s3f520bi3mzkNBPtbfF6yzGLDTsQetPaBudD0VrNR3FNJDrZ_uXrEw2v7KUFkujzCzauSqLRM_UAgOUR9qkco1ckA', 'not-before-policy': 0, 'session_state': '4e446df1-37b1-4391-bf1d-8561ccbbb012', 'scope': ['openid', 'profile', 'email', 'https://galaxyproject.org/api:*'], 'expires_at': 1708514468.010566}.
INFO:     127.0.0.1:52191 - "GET /authnz/keycloak/callback?state=7nV8LoTnnpuen5nLRYKRCF3CScmJZ1&session_state=4e446df1-37b1-4391-bf1d-8561ccbbb012&code=ebbdd785-25fe-42d7-9a4e-f0c7e01988b7.4e446df1-37b1-4391-bf1d-8561ccbbb012.52e25e17-fdb7-423a-83ab-90c27711d391 HTTP/1.1" 302 Found
INFO:     127.0.0.1:52191 - "GET /user/external_ids?notification=Your%20Keycloak%20identity%20has%20been%20linked%20to%20your%20Galaxy%20account. HTTP/1.1" 200 OK
INFO:     127.0.0.1:52195 - "GET /api/whoami HTTP/1.1" 200 OK
PASSEDINFO:     127.0.0.1:52197 - "GET /api/jobs?state=running HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    |     await self.app(scope, receive, send_wrapper)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    |     with collapse_excgroups():
    |   File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    |     await route.handle(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    |     await self.app(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    |     response = await func(request)
    |                ^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    |     raise e
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    |     return await run_in_threadpool(dependant.call, **values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    |     return await anyio.to_thread.run_sync(func, *args)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    |     return await get_async_backend().run_sync_in_worker_thread(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    |     return await future
    |            ^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    |     result = context.run(func, *args)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    |     return self.service.index(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    |     jobs = self.job_manager.index_query(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    |     stmt = stmt.where(Job.user_id == trans.user.id)
    |                                      ^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute 'id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    raise e
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    raw_response = await run_e
ndpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    return self.service.index(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    jobs = self.job_manager.index_query(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    stmt = stmt.where(Job.user_id == trans.user.id)
                                     ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_auth_by_access_token_never_logged_in INFO:     127.0.0.1:52199 - "GET /api/users/current HTTP/1.1" 401 Unauthorized
PASSEDINFO:     127.0.0.1:52200 - "GET /api/jobs?state=running HTTP/1.1" 500 Internal Server Error

test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_auth_with_expired_token ERROR:    Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    |     await self.app(scope, receive, send_wrapper)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    |     with collapse_excgroups():
    |   File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    |     await route.handle(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    |     await self.app(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    |     response = await func(request)
    |                ^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    |     raise e
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    |     return await run_in_threadpool(dependant.call, **values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    |     return await anyio.to_thread.run_sync(func, *args)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    |     return await get_async_backend().run_sync_in_worker_thread(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    |     return await future
    |            ^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    |     result = context.run(func, *args)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    |     return self.service.index(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    |     jobs = self.job_manager.index_query(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    |     stmt = stmt.where(Job.user_id == trans.user.id)
    |                                      ^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute 'id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    raise e
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    return self.service.index(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    jobs = self.job_manager.index_query(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    stmt = stmt.where(Job.user_id == trans.user.id)
                                     ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,188 [pN:main,p:38658,tN:WSGI_0] Generated new state 8ynREEu7zbGFOV08Vnr4YcS5BzRMRx.
INFO:     127.0.0.1:52201 - "GET /authnz/keycloak/login HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,227 [pN:main,p:38658,tN:WSGI_0] Encoding `client_id` "gxyclient" with `client_secret` as Basic auth credentials.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,228 [pN:main,p:38658,tN:WSGI_0] Requesting url https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token using method POST.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,228 [pN:main,p:38658,tN:WSGI_0] Supplying headers {'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0'} and data {'grant_type': 'authorization_code', 'code': '60455d82-b504-41c0-b2d9-709ff9dd9007.3d97e81f-b39b-4d85-8235-8f3ef90fd8e3.52e25e17-fdb7-423a-83ab-90c27711d391', 'redirect_uri': 'http://127.0.0.1:9500/authnz/keycloak/callback'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,228 [pN:main,p:38658,tN:WSGI_0] Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x2c7580910>, 'verify': False, 'proxies': None, 'cert': None}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,239 [pN:main,p:38658,tN:WSGI_0] Request to fetch token completed with status 200.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,239 [pN:main,p:38658,tN:WSGI_0] Request url was https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,239 [pN:main,p:38658,tN:WSGI_0] Request headers were {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0', 'Content-Length': '219', 'Content-Type': 'application/x-www-form-urlencoded'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,239 [pN:main,p:38658,tN:WSGI_0] Request body was grant_type=authorization_code&code=60455d82-b504-41c0-b2d9-709ff9dd9007.3d97e81f-b39b-4d85-8235-8f3ef90fd8e3.52e25e17-fdb7-423a-83ab-90c27711d391&redirect_uri=http%3A%2F%2F127.0.0.1%3A9500%2Fauthnz%2Fkeycloak%2Fcallback
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,239 [pN:main,p:38658,tN:WSGI_0] Response headers were {'Referrer-Policy': 'no-referrer', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff', 'Pragma': 'no-cache', 'X-XSS-Protection': '1; mode=block', 'Content-Type': 'application/json', 'content-length': '3824'} and content {"access_token":"eyJhbG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ImdpdmVuX25hbWUiOiJUZXN0IiwiZmFtaWx5X25hbWUiOiJHYWxheHlVc2VyIiwiZW1haWwiOiJneHl1c2VyQGdhbGF4eS5vcmcifQ.A_5Nq_TE3mLS2K98cg18IUA2EnXaaORt0F9h06oIoMoDnCQKkRAVaIrC2zZmUqfciQYLU3flqNhJ-L9vHRmxLwEt2vrC0PMgdmR6vriJQUx_KF0Tm6l4M2exZTwuO9NCsUNHxXaRh8Fhlt2VGBHADiWH8S8cQ6sXvjtTY5e-VUwS66UU_GtgkHnMVMs5JiN333ER-uBcBTOKx12BOEwBcV8Q61wlGi3_kQpHkx4JrVfYME7xYc7LbBaPGGYzbXqxQhlDCDcmjtTswOZkGk3MkrPyZWKL7CoUuYh5u-ksGT8rUAOMXUlGLUJq04lN4LI92k-aXC-iKOakLJv3lSZXyw","not-before-policy":0,"session_state":"3d97e81f-b39b-4d85-8235-8f3ef90fd8e3","scope":"openid profile email https://galaxyproject.org/api:*"}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,239 [pN:main,p:38658,tN:WSGI_0] Invoking 0 token response hooks.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:02,239 [pN:main,p:38658,tN:WSGI_0] Obtained token {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NjgsImlhdCI6MTcwODUxNDQ2MiwiYXV0aF90aW1lIjoxNzA4NTE0NDYyLCJqdGkiOiI3MjYzZmRkMC03ZGM4LTQxYWUtYmQ3Ni1kMjQ0ODUzY2UwZjEiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM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PyZWKL7CoUuYh5u-ksGT8rUAOMXUlGLUJq04lN4LI92k-aXC-iKOakLJv3lSZXyw', 'not-before-policy': 0, 'session_state': '3d97e81f-b39b-4d85-8235-8f3ef90fd8e3', 'scope': ['openid', 'profile', 'email', 'https://galaxyproject.org/api:*'], 'expires_at': 1708514468.239349}.
INFO:     127.0.0.1:52201 - "GET /authnz/keycloak/callback?state=8ynREEu7zbGFOV08Vnr4YcS5BzRMRx&session_state=3d97e81f-b39b-4d85-8235-8f3ef90fd8e3&code=60455d82-b504-41c0-b2d9-709ff9dd9007.3d97e81f-b39b-4d85-8235-8f3ef90fd8e3.52e25e17-fdb7-423a-83ab-90c27711d391 HTTP/1.1" 302 Found
INFO:     127.0.0.1:52201 - "GET / HTTP/1.1" 200 OK
INFO:     127.0.0.1:52205 - "GET /api/users/current HTTP/1.1" 200 OK
INFO:     127.0.0.1:52219 - "GET /api/users/current HTTP/1.1" 200 OK
galaxy.authnz.managers ERROR 2024-02-21 12:21:12,346 [pN:main,p:38658,tN:AnyIO worker thread] Could not decode access token
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/authnz/managers.py", line 441, in _match_access_token_to_user_in_provider
    user, jwt = backend.decode_user_access_token(sa_session, access_token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/authnz/custos_authnz.py", line 515, in decode_user_access_token
    decoded_jwt = jwt.decode(
                  ^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 210, in decode
    decoded = self.decode_complete(
              ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 162, in decode_complete
    self._validate_claims(
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 248, in _validate_claims
    self._validate_exp(payload, now, leeway)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 306, in _validate_exp
    raise ExpiredSignatureError("Signature has expired")
jwt.exceptions.ExpiredSignatureError: Signature has expired
INFO:     127.0.0.1:52254 - "GET /api/users/current HTTP/1.1" 401 Unauthorized
PASSEDINFO:     127.0.0.1:52255 - "GET /api/jobs?state=running HTTP/1.1" 500 Internal Server Error

test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_auth_with_another_authorized_client ERROR:    Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    |     await self.app(scope, receive, send_wrapper)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    |     with collapse_excgroups():
    |   File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    |     await route.handle(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    |     await self.app(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    |     response = await func(request)
    |                ^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    |     raise e
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    |     return await run_in_threadpool(dependant.call, **values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    |     return await anyio.to_thread.run_sync(func, *args)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    |     return await get_async_backend().run_sync_in_worker_thread(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    |     return await future
    |            ^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    |     result = context.run(func, *args)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    |     return self.service.index(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    |     jobs = self.job_manager.index_query(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    |     stmt = stmt.where(Job.user_id == trans.user.id)
    |                                      ^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute 'id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    raise e
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    return self.service.index(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    jobs = self.job_manager.index_query(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    stmt = stmt.where(Job.user_id == trans.user.id)
                                     ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,380 [pN:main,p:38658,tN:WSGI_0] Generated new state 2JhxJrZXZivO6H8CO6MRmL3flRKD5t.
INFO:     127.0.0.1:52256 - "GET /authnz/keycloak/login HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,521 [pN:main,p:38658,tN:WSGI_0] Encoding `client_id` "gxyclient" with `client_secret` as Basic auth credentials.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,521 [pN:main,p:38658,tN:WSGI_0] Requesting url https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token using method POST.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,521 [pN:main,p:38658,tN:WSGI_0] Supplying headers {'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0'} and data {'grant_type': 'authorization_code', 'code': '4919c34e-185d-4ce5-b0f4-1704722462a5.ff477fa5-7d46-4832-9cdb-a673d732f24b.52e25e17-fdb7-423a-83ab-90c27711d391', 'redirect_uri': 'http://127.0.0.1:9500/authnz/keycloak/callback'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,521 [pN:main,p:38658,tN:WSGI_0] Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x2c7203410>, 'verify': False, 'proxies': None, 'cert': None}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,539 [pN:main,p:38658,tN:WSGI_0] Request to fetch token completed with status 200.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,539 [pN:main,p:38658,tN:WSGI_0] Request url was https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,539 [pN:main,p:38658,tN:WSGI_0] Request headers were {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0', 'Content-Length': '219', 'Content-Type': 'application/x-www-form-urlencoded'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,539 [pN:main,p:38658,tN:WSGI_0] Request body was grant_type=authorization_code&code=4919c34e-185d-4ce5-b0f4-1704722462a5.ff477fa5-7d46-4832-9cdb-a673d732f24b.52e25e17-fdb7-423a-83ab-90c27711d391&redirect_uri=http%3A%2F%2F127.0.0.1%3A9500%2Fauthnz%2Fkeycloak%2Fcallback
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,539 [pN:main,p:38658,tN:WSGI_0] Response headers were {'Referrer-Policy': 'no-referrer', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff', 'Pragma': 'no-cache', 'X-XSS-Protection': '1; mode=block', 'Content-Type': 'application/json', 'content-length': '3824'} and content {"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NzgsImlhdCI6MTcwODUxNDQ3MiwiYXV0aF90aW1lIjoxNzA4NTE0NDcyLCJqdGkiOiIxMjI2NTUzNy0wMGM1LTQ0ZTMtOGU5Ni0wMTE1ZjdlYjZkZjYiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM5YyIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4eWNsaWVudCIsIm5vbmNlIjoiN2Q3ZTI2ZGI5ZGE4OGRiODU0M2IwOTI1ZmFkZWNiNGMzNGJiOTM0ZTVhNTU3NmE0MDBhNWJlYzI5NWVlOTBiNSIsInNlc3Npb25fc3RhdGUiOiJmZjQ3N2ZhNS03ZDQ2LTQ4MzItOWNkYi1hNjczZDczMmYyNGIiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImdhbGF4eS1hY2Nlc3Mtcm9sZSIsIm9mZ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zYjA5MjVmYWRlY2I0YzM0YmI5MzRlNWE1NTc2YTQwMGE1YmVjMjk1ZWU5MGI1Iiwic2Vzc2lvbl9zdGF0ZSI6ImZmNDc3ZmE1LTdkNDYtNDgzMi05Y2RiLWE2NzNkNzMyZjI0YiIsImF0X2hhc2giOiJiVHJoRlJFcDFSMkZMWjBhdUF1N0x3IiwiYWNyIjoiMSIsInNpZCI6ImZmNDc3ZmE1LTdkNDYtNDgzMi05Y2RiLWE2NzNkNzMyZjI0YiIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiVGVzdCBHYWxheHlVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZ3h5dXNlciIsImdpdmVuX25hbWUiOiJUZXN0IiwiZmFtaWx5X25hbWUiOiJHYWxheHlVc2VyIiwiZW1haWwiOiJneHl1c2VyQGdhbGF4eS5vcmcifQ.stoc-Q4BgFEYDJg88c-69e9rBMYZI-UKQ5kN40e4QhgGpthv4Mx1Tb7uata8vK9Rpnn7_Aj2rOIa9LxVKe1_Ua9iFUbipxJPSXnb047M0Uj8mA_Ceb_yo8ayOuNbzi9bDYLFPvU15r2MOgsqtyL75bxvysmHhSyN_yA7LKlL32eBZjHZf9qmdTmquzmzu58ElmneWEI0E0RGzMDbVaD8xasP-NsWP7nFT7WLl8zMUq1HBKE3PP84fpYwFinYoLPzgBaLfN7x5iazPBsNDlLDK3cmkgogC8Cl-jV0SMbG_M4gWTItul_crkCLcJEtblEtN-e-P3GzpKx1o0tvWoroHw","not-before-policy":0,"session_state":"ff477fa5-7d46-4832-9cdb-a673d732f24b","scope":"openid profile email https://galaxyproject.org/api:*"}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,542 [pN:main,p:38658,tN:WSGI_0] Invoking 0 token response hooks.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,542 [pN:main,p:38658,tN:WSGI_0] Obtained token {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiS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lciIsImdpdmVuX25hbWUiOiJUZXN0IiwiZmFtaWx5X25hbWUiOiJHYWxheHlVc2VyIiwiZW1haWwiOiJneHl1c2VyQGdhbGF4eS5vcmcifQ.stoc-Q4BgFEYDJg88c-69e9rBMYZI-UKQ5kN40e4QhgGpthv4Mx1Tb7uata8vK9Rpnn7_Aj2rOIa9LxVKe1_Ua9iFUbipxJPSXnb047M0Uj8mA_Ceb_yo8ayOuNbzi9bDYLFPvU15r2MOgsqtyL75bxvysmHhSyN_yA7LKlL32eBZjHZf9qmdTmquzmzu58ElmneWEI0E0RGzMDbVaD8xasP-NsWP7nFT7WLl8zMUq1HBKE3PP84fpYwFinYoLPzgBaLfN7x5iazPBsNDlLDK3cmkgogC8Cl-jV0SMbG_M4gWTItul_crkCLcJEtblEtN-e-P3GzpKx1o0tvWoroHw', 'not-before-policy': 0, 'session_state': 'ff477fa5-7d46-4832-9cdb-a673d732f24b', 'scope': ['openid', 'profile', 'email', 'https://galaxyproject.org/api:*'], 'expires_at': 1708514478.5426219}.
INFO:     127.0.0.1:52256 - "GET /authnz/keycloak/callback?state=2JhxJrZXZivO6H8CO6MRmL3flRKD5t&session_state=ff477fa5-7d46-4832-9cdb-a673d732f24b&code=4919c34e-185d-4ce5-b0f4-1704722462a5.ff477fa5-7d46-4832-9cdb-a673d732f24b.52e25e17-fdb7-423a-83ab-90c27711d391 HTTP/1.1" 302 Found
INFO:     127.0.0.1:52256 - "GET / HTTP/1.1" 200 OK
INFO:     127.0.0.1:52264 - "GET /api/users/current HTTP/1.1" 200 OK
PASSEDINFO:     127.0.0.1:52265 - "GET /api/jobs?state=running HTTP/1.1" 500 Internal Server Error

test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_auth_with_authorized_client_but_unauthorized_audience ERROR:    Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    |     await self.app(scope, receive, send_wrapper)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    |     with collapse_excgroups():
    |   File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    |     await route.handle(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    |     await self.app(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    |     response = await func(request)
    |                ^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    |     raise e
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    |     return await run_in_threadpool(dependant.call, **values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    |     return await anyio.to_thread.run_sync(func, *args)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    |     return await get_async_backend().run_sync_in_worker_thread(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    |     return await future
    |            ^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    |     result = context.run(func, *args)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    |     return self.service.index(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    |     jobs = self.job_manager.index_query(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    |     stmt = stmt.where(Job.user_id == trans.user.id)
    |                                      ^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute 'id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    raise e
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    return self.service.index(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    jobs = self.job_manager.index_query(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    stmt = stmt.where(Job.user_id == trans.user.id)
                                     ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,638 [pN:main,p:38658,tN:WSGI_0] Generated new state NIxUJtjjlkLd6J55PGzcOMhfpTNhV0.
INFO:     127.0.0.1:52266 - "GET /authnz/keycloak/login HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,682 [pN:main,p:38658,tN:WSGI_0] Encoding `client_id` "gxyclient" with `client_secret` as Basic auth credentials.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,682 [pN:main,p:38658,tN:WSGI_0] Requesting url https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token using method POST.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,682 [pN:main,p:38658,tN:WSGI_0] Supplying headers {'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0'} and data {'grant_type': 'authorization_code', 'code': 'fb97102f-f3eb-4f6e-ba6a-9562855a04bd.257301be-5d92-4aea-8f7b-18474871cfe4.52e25e17-fdb7-423a-83ab-90c27711d391', 'redirect_uri': 'http://127.0.0.1:9500/authnz/keycloak/callback'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,682 [pN:main,p:38658,tN:WSGI_0] Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x2c80486d0>, 'verify': False, 'proxies': None, 'cert': None}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,697 [pN:main,p:38658,tN:WSGI_0] Request to fetch token completed with status 200.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,697 [pN:main,p:38658,tN:WSGI_0] Request url was https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,697 [pN:main,p:38658,tN:WSGI_0] Request headers were {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0', 'Content-Length': '219', 'Content-Type': 'application/x-www-form-urlencoded'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,697 [pN:main,p:38658,tN:WSGI_0] Request body was grant_type=authorization_code&code=fb97102f-f3eb-4f6e-ba6a-9562855a04bd.257301be-5d92-4aea-8f7b-18474871cfe4.52e25e17-fdb7-423a-83ab-90c27711d391&redirect_uri=http%3A%2F%2F127.0.0.1%3A9500%2Fauthnz%2Fkeycloak%2Fcallback
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,697 [pN:main,p:38658,tN:WSGI_0] Response headers were {'Referrer-Policy': 'no-referrer', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff', 'Pragma': 'no-cache', 'X-XSS-Protection': '1; mode=block', 'Content-Type': 'application/json', 'content-length': '3553'} and content {"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA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yYlWvHKI-ff7vvFoqDjmdUqRqzu1hz81MObuT9qZXdtrvtLuLL1jgloMvemRuw8nZoPQwg7LfDR2oaJ6YFub1u1_IyispAAcOUX08knwcr0TaKXjyttzTWkDG2mpQJU30e-P8MY06QNPMrNs_QKNA","not-before-policy":0,"session_state":"257301be-5d92-4aea-8f7b-18474871cfe4","scope":"openid profile email"}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,697 [pN:main,p:38658,tN:WSGI_0] Invoking 0 token response hooks.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,697 [pN:main,p:38658,tN:WSGI_0] Obtained token {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NzgsImlhdCI6MTcwODUxNDQ3MiwiYXV0aF90aW1lIjoxNzA4NTE0NDcyLCJqdGkiOiIxMzIzNWZkZC1hZGQ3LTRkMjMtYTY3MS0zMGE4OTk4MzUzMjkiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsInN1YiI6Ijg5ODZjODc1LTc1YjMtNDAxNS05MWExLThkYWNlNzhkOWMzYiIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4eWNsaWVudCIsIm5vbmNlIjoiNGI5MWE0NDYyZWI4ZWVkODBkMDY4ZWQ3NDA5MTcwMTAxODY4Njg4NmM2MjE3NDZhZGUyMmZkMmEzNmUzNWNiYyIsInNlc3Npb25fc3RhdGUiOiIyNTczMDFiZS01ZDkyLTRhZWEtOGY3Yi0xODQ3NDg3MWNmZTQiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwiYnBhLWFjY2Vzcy1yb2xlIiwiZGVmYXVsdC1yb2xlcy1neHlyZWFs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NpZCI6IjI1NzMwMWJlLTVkOTItNGFlYS04ZjdiLTE4NDc0ODcxY2ZlNCIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJicGFvbmx5dXNlciIsImdpdmVuX25hbWUiOiIiLCJmYW1pbHlfbmFtZSI6IiIsImVtYWlsIjoiYnBhdXNlckBicGEub3JnIn0.cKD3WWjCER4_FuvXm3-xOCVDAQ0KOxaHDkDjT60eMPVuHuu7k4CpwKtUBbK5UR8s-nNItNeRM_Bj7-miGtU0XnYfdt4_mJiBo7Ksecrl5I5aduCK-z7c8emQyELW1Tk8sYFSrF__IKLRYaDj21kI36LrHywRxqA7QWhwQe8f_ME_uohNngpsZMgyTLNYADQ4iyYlWvHKI-ff7vvFoqDjmdUqRqzu1hz81MObuT9qZXdtrvtLuLL1jgloMvemRuw8nZoPQwg7LfDR2oaJ6YFub1u1_IyispAAcOUX08knwcr0TaKXjyttzTWkDG2mpQJU30e-P8MY06QNPMrNs_QKNA', 'not-before-policy': 0, 'session_state': '257301be-5d92-4aea-8f7b-18474871cfe4', 'scope': ['openid', 'profile', 'email'], 'expires_at': 1708514478.69781}.
INFO:     127.0.0.1:52266 - "GET /authnz/keycloak/callback?state=NIxUJtjjlkLd6J55PGzcOMhfpTNhV0&session_state=257301be-5d92-4aea-8f7b-18474871cfe4&code=fb97102f-f3eb-4f6e-ba6a-9562855a04bd.257301be-5d92-4aea-8f7b-18474871cfe4.52e25e17-fdb7-423a-83ab-90c27711d391 HTTP/1.1" 302 Found
INFO:     127.0.0.1:52266 - "GET /user/external_ids?notification=Your%20Keycloak%20identity%20has%20been%20linked%20to%20your%20Galaxy%20account. HTTP/1.1" 200 OK
galaxy.authnz.managers ERROR 2024-02-21 12:21:12,793 [pN:main,p:38658,tN:AnyIO worker thread] Could not decode access token
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/authnz/managers.py", line 441, in _match_access_token_to_user_in_provider
    user, jwt = backend.decode_user_access_token(sa_session, access_token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/authnz/custos_authnz.py", line 515, in decode_user_access_token
    decoded_jwt = jwt.decode(
                  ^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 210, in decode
    decoded = self.decode_complete(
              ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 162, in decode_complete
    self._validate_claims(
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 254, in _validate_claims
    self._validate_aud(
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 356, in _validate_aud
    raise InvalidAudienceError("Audience doesn't match")
jwt.exceptions.InvalidAudienceError: Audience doesn't match
INFO:     127.0.0.1:52270 - "GET /api/users/current HTTP/1.1" 401 Unauthorized
PASSEDINFO:     127.0.0.1:52271 - "GET /api/jobs?state=running HTTP/1.1" 500 Internal Server Error

test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_auth_with_unauthorized_client ERROR:    Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    |     await self.app(scope, receive, send_wrapper)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    |     with collapse_excgroups():
    |   File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    |     await route.handle(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    |     await self.app(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    |     response = await func(request)
    |                ^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    |     raise e
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    |     return await run_in_threadpool(dependant.call, **values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    |     return await anyio.to_thread.run_sync(func, *args)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    |     return await get_async_backend().run_sync_in_worker_thread(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    |     return await future
    |            ^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    |     result = context.run(func, *args)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    |     return self.service.index(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    |     jobs = self.job_manager.index_query(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    |     stmt = stmt.where(Job.user_id == trans.user.id)
    |                                      ^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute 'id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    raise e
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    return self.service.index(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    jobs = self.job_manager.index_query(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    stmt = stmt.where(Job.user_id == trans.user.id)
                                     ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,806 [pN:main,p:38658,tN:WSGI_0] Generated new state b0xIDkJ3HNANglC9lZtIpccYBAOmwR.
INFO:     127.0.0.1:52272 - "GET /authnz/keycloak/login HTTP/1.1" 200 OK
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,845 [pN:main,p:38658,tN:WSGI_0] Encoding `client_id` "gxyclient" with `client_secret` as Basic auth credentials.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,846 [pN:main,p:38658,tN:WSGI_0] Requesting url https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token using method POST.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,846 [pN:main,p:38658,tN:WSGI_0] Supplying headers {'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0'} and data {'grant_type': 'authorization_code', 'code': '3f2ff7e0-5b11-409d-93e2-2b70c07f7f83.49aaf7c3-932a-4f06-bf89-d28ca615bfcb.52e25e17-fdb7-423a-83ab-90c27711d391', 'redirect_uri': 'http://127.0.0.1:9500/authnz/keycloak/callback'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,846 [pN:main,p:38658,tN:WSGI_0] Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x2c7289d10>, 'verify': False, 'proxies': None, 'cert': None}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,856 [pN:main,p:38658,tN:WSGI_0] Request to fetch token completed with status 200.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,856 [pN:main,p:38658,tN:WSGI_0] Request url was https://localhost:9443/realms/gxyrealm/protocol/openid-connect/token
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,856 [pN:main,p:38658,tN:WSGI_0] Request headers were {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic Z3h5Y2xpZW50OmR1bW15Y2xpZW50c2VjcmV0', 'Content-Length': '219', 'Content-Type': 'application/x-www-form-urlencoded'}
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,856 [pN:main,p:38658,tN:WSGI_0] Request body was grant_type=authorization_code&code=3f2ff7e0-5b11-409d-93e2-2b70c07f7f83.49aaf7c3-932a-4f06-bf89-d28ca615bfcb.52e25e17-fdb7-423a-83ab-90c27711d391&redirect_uri=http%3A%2F%2F127.0.0.1%3A9500%2Fauthnz%2Fkeycloak%2Fcallback
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,856 [pN:main,p:38658,tN:WSGI_0] Response headers were {'Referrer-Policy': 'no-referrer', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff', 'Pragma': 'no-cache', 'X-XSS-Protection': '1; mode=block', 'Content-Type': 'application/json', 'content-length': '3824'} and content {"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NzgsImlhdCI6MTcwODUxNDQ3MiwiYXV0aF90aW1lIjoxNzA4NTE0NDcyLCJqdGkiOiJjOWQyYjE4Zi05MzIwLTQ2N2UtOTYxMi00OGE2ODk3MGJlMWQiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5ND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J_lgSRPQpmH21Xd7BdUt5QvOh24EhJNRmw5j6prY5OkcYY9EZC02MgtrKg5GES71blmmcHIrDnBlT_QonN0-mB3ZjZdNUFYtWuv9HDSMoXRPFH86P4e3gfxcGMeXOdsPFcgUb2VgUbbhYQoNA0EJyplBwyALtfeVSjechx11Q","not-before-policy":0,"session_state":"49aaf7c3-932a-4f06-bf89-d28ca615bfcb","scope":"openid profile email https://galaxyproject.org/api:*"}.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,856 [pN:main,p:38658,tN:WSGI_0] Invoking 0 token response hooks.
requests_oauthlib.oauth2_session DEBUG 2024-02-21 12:21:12,856 [pN:main,p:38658,tN:WSGI_0] Obtained token {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJsaG9TQlV4bC1HNW1nUHpqemZZR183ZEdMbUc4X0VQN3A2MnVwTzZ3RlRZIn0.eyJleHAiOjE3MDg1MTQ0NzgsImlhdCI6MTcwODUxNDQ3MiwiYXV0aF90aW1lIjoxNzA4NTE0NDcyLCJqdGkiOiJjOWQyYjE4Zi05MzIwLTQ2N2UtOTYxMi00OGE2ODk3MGJlMWQiLCJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo5NDQzL3JlYWxtcy9neHlyZWFsbSIsImF1ZCI6Imd4eWNsaWVudCIsInN1YiI6IjI0ZmZhM2ZmLWQzNTEtNGQ1ZS1iMTBiLThkNjE1MDgyZWM5YyIsInR5cCI6IkJlYXJlciIsImF6cCI6Imd4eWNsaWVudCIsIm5vbmNlIjoiNjZhNGVmNjc1YzQ2NzhkNTU4YzYxMjY2OThkMzRkMmQ3MjEwYjBjODQ2ODkyMjNhNGMwMzE4NTAwMjE0NGNhMCIsInNlc3Npb25fc3RhdGUiOiI0OWFhZjdjMy05MzJhLTRmMDYtYmY4OS1kMjhjYTYxNWJmY2IiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImdhbGF4eS1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Iiwibm9uY2UiOiI2NmE0ZWY2NzVjNDY3OGQ1NThjNjEyNjY5OGQzNGQyZDcyMTBiMGM4NDY4OTIyM2E0YzAzMTg1MDAyMTQ0Y2EwIiwic2Vzc2lvbl9zdGF0ZSI6IjQ5YWFmN2MzLTkzMmEtNGYwNi1iZjg5LWQyOGNhNjE1YmZjYiIsImF0X2hhc2giOiJUQktqaE93VHluTjBDVW1RSXRfdTJRIiwiYWNyIjoiMSIsInNpZCI6IjQ5YWFmN2MzLTkzMmEtNGYwNi1iZjg5LWQyOGNhNjE1YmZjYiIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiVGVzdCBHYWxheHlVc2VyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZ3h5dXNlciIsImdpdmVuX25hbWUiOiJUZXN0IiwiZmFtaWx5X25hbWUiOiJHYWxheHlVc2VyIiwiZW1haWwiOiJneHl1c2VyQGdhbGF4eS5vcmcifQ.JAmkFPrdgqOz_qRS7Kt4SB_9SwKP_6PM-ATOg4m-_iSdNHlPUVe_5U7rFcgfxucgBSh-OwQPRwMdqRgRjHqsKxXMUV23F_6Yk1x0QYeNx4dvrFaDTfKcpBDj4c2O20js8AHcoH_39ucuM-7LaEbb4KA_XhnyRd5220fCAQF7E_10dJ_lgSRPQpmH21Xd7BdUt5QvOh24EhJNRmw5j6prY5OkcYY9EZC02MgtrKg5GES71blmmcHIrDnBlT_QonN0-mB3ZjZdNUFYtWuv9HDSMoXRPFH86P4e3gfxcGMeXOdsPFcgUb2VgUbbhYQoNA0EJyplBwyALtfeVSjechx11Q', 'not-before-policy': 0, 'session_state': '49aaf7c3-932a-4f06-bf89-d28ca615bfcb', 'scope': ['openid', 'profile', 'email', 'https://galaxyproject.org/api:*'], 'expires_at': 1708514478.8568692}.
INFO:     127.0.0.1:52272 - "GET /authnz/keycloak/callback?state=b0xIDkJ3HNANglC9lZtIpccYBAOmwR&session_state=49aaf7c3-932a-4f06-bf89-d28ca615bfcb&code=3f2ff7e0-5b11-409d-93e2-2b70c07f7f83.49aaf7c3-932a-4f06-bf89-d28ca615bfcb.52e25e17-fdb7-423a-83ab-90c27711d391 HTTP/1.1" 302 Found
INFO:     127.0.0.1:52272 - "GET / HTTP/1.1" 200 OK
galaxy.authnz.managers ERROR 2024-02-21 12:21:12,914 [pN:main,p:38658,tN:AnyIO worker thread] Could not decode access token
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/authnz/managers.py", line 441, in _match_access_token_to_user_in_provider
    user, jwt = backend.decode_user_access_token(sa_session, access_token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/authnz/custos_authnz.py", line 515, in decode_user_access_token
    decoded_jwt = jwt.decode(
                  ^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 210, in decode
    decoded = self.decode_complete(
              ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 162, in decode_complete
    self._validate_claims(
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 254, in _validate_claims
    self._validate_aud(
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 325, in _validate_aud
    raise MissingRequiredClaimError("aud")
jwt.exceptions.MissingRequiredClaimError: Token is missing the "aud" claim
INFO:     127.0.0.1:52276 - "GET /api/users/current HTTP/1.1" 401 Unauthorized
PASSEDINFO:     127.0.0.1:52277 - "GET /api/jobs?state=running HTTP/1.1" 500 Internal Server Error

test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_auth_without_required_scopes ERROR:    Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    |     await self.app(scope, receive, send_wrapper)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    |     with collapse_excgroups():
    |   File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    |     await route.handle(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    |     await self.app(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    |     response = await func(request)
    |                ^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    |     raise e
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    |     return await run_in_threadpool(dependant.call, **values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    |     return await anyio.to_thread.run_sync(func, *args)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    |     return await get_async_backend().run_sync_in_worker_thread(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    |     return await future
    |            ^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    |     result = context.run(func, *args)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    |     return self.service.index(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    |     jobs = self.job_manager.index_query(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    |     stmt = stmt.where(Job.user_id == trans.user.id)
    |                                      ^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute 'id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    raise e
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    return self.service.index(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    jobs = self.job_manager.index_query(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    stmt = stmt.where(Job.user_id == trans.user.id)
                                     ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
galaxy.authnz.managers ERROR 2024-02-21 12:21:12,954 [pN:main,p:38658,tN:AnyIO worker thread] Could not decode access token
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/authnz/managers.py", line 441, in _match_access_token_to_user_in_provider
    user, jwt = backend.decode_user_access_token(sa_session, access_token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/authnz/custos_authnz.py", line 515, in decode_user_access_token
    decoded_jwt = jwt.decode(
                  ^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 210, in decode
    decoded = self.decode_complete(
              ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 162, in decode_complete
    self._validate_claims(
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 254, in _validate_claims
    self._validate_aud(
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/jwt/api_jwt.py", line 356, in _validate_aud
    raise InvalidAudienceError("Audience doesn't match")
jwt.exceptions.InvalidAudienceError: Audience doesn't match
INFO:     127.0.0.1:52279 - "GET /api/users/current HTTP/1.1" 401 Unauthorized
PASSEDINFO:     127.0.0.1:52280 - "GET /api/jobs?state=running HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    |     await self.app(scope, receive, send_wrapper)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    |     with collapse_excgroups():
    |   File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    |     await route.handle(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    |     await self.app(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    |     response = await func(request)
    |                ^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    |     raise e
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    |     return await run_in_threadpool(dependant.call, **values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    |     return await anyio.to_thread.run_sync(func, *args)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    |     return await get_async_backend().run_sync_in_worker_thread(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    |     return await future
    |            ^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    |     result = context.run(func, *args)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    |     return self.service.index(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    |     jobs = self.job_manager.index_query(trans, payload)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    |     stmt = stmt.where(Job.user_id == trans.user.id)
    |                                      ^^^^^^^^^^^^^
    | AttributeError: 'NoneType' object has no attribute 'id'
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 299, in app
    raise e
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 294, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py", line 248, in index
    return self.service.index(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/services/jobs.py", line 83, in index
    jobs = self.job_manager.index_query(trans, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/jobs.py", line 211, in index_query
    stmt = stmt.where(Job.user_id == trans.user.id)
                                     ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'id'
TestGalaxyOIDCLoginIntegration_container
test_driver INFO 2024-02-21 12:21:13,255 [pN:main,p:38658,tN:MainThread] 24 threads were active before stopping embedded server
test_driver INFO 2024-02-21 12:21:13,255 [pN:main,p:38658,tN:MainThread] Shutting down embedded galaxy uvicorn server
test_driver INFO 2024-02-21 12:21:13,255 [pN:main,p:38658,tN:MainThread] Embedded web server galaxy stopped
test_driver INFO 2024-02-21 12:21:13,255 [pN:main,p:38658,tN:MainThread] Stopping embedded server thread
INFO:     Shutting down
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [38658]
test_driver INFO 2024-02-21 12:21:13,449 [pN:main,p:38658,tN:Thread-16 (run_in_loop)] Event loop for uvicorn closed
test_driver INFO 2024-02-21 12:21:13,450 [pN:main,p:38658,tN:MainThread] Embedded server thread stopped
test_driver INFO 2024-02-21 12:21:13,450 [pN:main,p:38658,tN:MainThread] Stopping application galaxy
galaxy.queue_worker INFO 2024-02-21 12:21:14,155 [pN:main,p:38658,tN:MainThread] Sending reconfigure_watcher control task.
galaxy.util.monitors DEBUG 2024-02-21 12:21:14,159 [pN:main,p:38658,tN:MainThread] Joining monitor thread
galaxy.jobs.handler INFO 2024-02-21 12:21:14,159 [pN:main,p:38658,tN:MainThread] sending stop signal to worker thread
galaxy.util.monitors DEBUG 2024-02-21 12:21:14,159 [pN:main,p:38658,tN:MainThread] Joining monitor thread
galaxy.jobs.handler INFO 2024-02-21 12:21:14,159 [pN:main,p:38658,tN:MainThread] job handler queue stopped
galaxy.jobs.runners INFO 2024-02-21 12:21:14,160 [pN:main,p:38658,tN:MainThread] LocalRunner: Sending stop signal to 4 job worker threads
galaxy.jobs.runners INFO 2024-02-21 12:21:14,160 [pN:main,p:38658,tN:MainThread] Waiting up to 5 seconds for job worker threads to shutdown...
galaxy.jobs.runners INFO 2024-02-21 12:21:14,160 [pN:main,p:38658,tN:MainThread] All job worker threads shutdown cleanly
galaxy.jobs.runners INFO 2024-02-21 12:21:14,160 [pN:main,p:38658,tN:MainThread] TaskRunner: Sending stop signal to 4 job worker threads
galaxy.jobs.runners INFO 2024-02-21 12:21:14,160 [pN:main,p:38658,tN:MainThread] Waiting up to 5 seconds for job worker threads to shutdown...
galaxy.jobs.runners DEBUG 2024-02-21 12:21:14,316 [pN:main,p:38658,tN:MainThread] Job worker thread terminated: TaskRunner.work_thread-0
galaxy.jobs.runners INFO 2024-02-21 12:21:14,316 [pN:main,p:38658,tN:MainThread] All job worker threads shutdown cleanly
galaxy.jobs.handler INFO 2024-02-21 12:21:14,316 [pN:main,p:38658,tN:MainThread] sending stop signal to worker thread
galaxy.util.monitors DEBUG 2024-02-21 12:21:14,316 [pN:main,p:38658,tN:MainThread] Joining monitor thread
galaxy.jobs.handler INFO 2024-02-21 12:21:14,316 [pN:main,p:38658,tN:MainThread] job handler stop queue stopped
test_driver INFO 2024-02-21 12:21:14,317 [pN:main,p:38658,tN:MainThread] Application galaxy stopped.
test_driver INFO 2024-02-21 12:21:14,317 [pN:main,p:38658,tN:MainThread] 2 active after stopping embedded server
test_driver DEBUG 2024-02-21 12:21:14,317 [pN:main,p:38658,tN:MainThread] After stopping all servers thread <_MainThread(MainThread, started 8003690176)> is alive.
test_driver DEBUG 2024-02-21 12:21:14,317 [pN:main,p:38658,tN:MainThread] After stopping all servers thread <Thread(Thread-2 (start), started daemon 6108590080)> is alive.
test_driver INFO 2024-02-21 12:21:14,317 [pN:main,p:38658,tN:MainThread] GALAXY_TEST_NO_CLEANUP is on. Temporary files in /Users/mvandenb/tmp/tmpw5j9tgad
celery.bootsteps DEBUG 2024-02-21 12:21:16,040 [pN:main,p:38658,tN:Thread-2 (start)] | Worker: Closing Pool...
celery.bootsteps DEBUG 2024-02-21 12:21:16,041 [pN:main,p:38658,tN:Thread-2 (start)] | Worker: Closing Consumer...
celery.bootsteps DEBUG 2024-02-21 12:21:16,041 [pN:main,p:38658,tN:Thread-2 (start)] | Worker: Terminating Consumer...
celery.bootsteps DEBUG 2024-02-21 12:21:16,041 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Closing Connection...
celery.bootsteps DEBUG 2024-02-21 12:21:16,041 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Closing Tasks...
celery.bootsteps DEBUG 2024-02-21 12:21:16,041 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Closing Control...
celery.bootsteps DEBUG 2024-02-21 12:21:16,041 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Closing event loop...
celery.bootsteps DEBUG 2024-02-21 12:21:16,042 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Stopping event loop...
celery.bootsteps DEBUG 2024-02-21 12:21:16,042 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Stopping Control...
celery.bootsteps DEBUG 2024-02-21 12:21:16,043 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Stopping Tasks...
celery.worker.consumer.tasks DEBUG 2024-02-21 12:21:16,043 [pN:main,p:38658,tN:Thread-2 (start)] Canceling task consumer...
celery.bootsteps DEBUG 2024-02-21 12:21:16,043 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Stopping Connection...
celery.bootsteps DEBUG 2024-02-21 12:21:16,044 [pN:main,p:38658,tN:Thread-2 (start)] | Worker: Terminating Pool...
celery.bootsteps DEBUG 2024-02-21 12:21:16,044 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Shutdown Control...
celery.bootsteps DEBUG 2024-02-21 12:21:16,044 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Shutdown Tasks...
celery.worker.consumer.tasks DEBUG 2024-02-21 12:21:16,044 [pN:main,p:38658,tN:Thread-2 (start)] Canceling task consumer...
celery.worker.consumer.tasks DEBUG 2024-02-21 12:21:16,044 [pN:main,p:38658,tN:Thread-2 (start)] Closing consumer channel...
celery.bootsteps DEBUG 2024-02-21 12:21:16,044 [pN:main,p:38658,tN:Thread-2 (start)] | Consumer: Shutdown Connection...


================================================================== warnings summary ==================================================================
.venv/lib/python3.11/site-packages/webob/compat.py:5
  /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/webob/compat.py:5: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
    from cgi import parse_header

lib/galaxy/util/template.py:4
  /Users/mvandenb/src/galaxy/lib/galaxy/util/template.py:4: DeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
    from lib2to3.refactor import RefactoringTool

lib/galaxy/util/image_util.py:3
  /Users/mvandenb/src/galaxy/lib/galaxy/util/image_util.py:3: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13
    import imghdr

.venv/lib/python3.11/site-packages/pydantic/fields.py:799: 45 warnings
  /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/pydantic/fields.py:799: PydanticDeprecatedSince20: Using extra keyword arguments on `Field` is deprecated and will be removed. Use `json_schema_extra` instead. (Extra keys: 'example'). Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
    warn(

.venv/bin/bagit.py:24
  /Users/mvandenb/src/galaxy/.venv/bin/bagit.py:24: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import DistributionNotFound, get_distribution

.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2846
.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2846
  /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2846: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('paste')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2846
  /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2846: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('repoze')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2846
.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2846
.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2846
.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2846
  /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2846: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

test/integration/oidc/test_auth_oidc.py: 35 warnings
  /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
    warnings.warn(

test/integration/oidc/test_auth_oidc.py::TestGalaxyOIDCLoginIntegration::test_auth_by_access_token_logged_in_once
  /Users/mvandenb/src/galaxy/.venv/lib/python3.11/site-packages/pydantic/type_adapter.py:314: UserWarning: Pydantic serializer warnings:
    Expected `datetime` but got `str` - serialized value may not be as expected
    return self.serializer.to_python(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
-------------------------------- Generated html report: file:///Users/mvandenb/src/galaxy/run_integration_tests.html ---------------------------------
========================================================== 11 passed, 92 warnings in 51.95s ==========================================================

It's unclear if that's just a consequence of not having passed proper credentials to the test interactor, or something's really broken.

@nuwang
Copy link
Member Author

nuwang commented Feb 21, 2024

If you're testing PSA, a probably cause for this is that decode_user_access_token is not implemented for PSA, only Keycloak OIDC.

def decode_user_access_token(self, sa_session, access_token):

@mvdbeek
Copy link
Member

mvdbeek commented Feb 21, 2024

No, that's just the literal test added here: ./run_tests.sh --skip-common-startup -integration test/integration/oidc/test_auth_oidc.py -- -s

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.

7 participants