OpenId Connect can not authenticate when using multiples IdPs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
keystoneauth |
In Progress
|
Undecided
|
Pedro Henrique Pereira Martins |
Bug Description
Versions
========
Keystone: 14.0.1 (Rocky)
Keystoneauth: 3.17.1
Problem description
===================
When we try to use the OpenStack CLI with the OpenId Connect protocol (in an environment with multiple IdPs) to enable federated users to login, we get an error from the CLI while generating the Keystone subject token (not the OIDC access token).
The error happens because when the keystoneauth lib calls the Keystone WSGI (the OIDC proxy) to generate an auth token, it expects an auth token as the response, but it gets an HTML document response. A page for the user choose which IdP he/she desires to use/ in other words, the CLI receives the discovery page HTML .
The actual v3oidcpassword plugin authentication flow is basically :
- The keystoneauth retrieves the credentials from the configs, like client id, client secret, IdP token URL, user name, password. It (Keystoneauth) uses these data to generate an access_token in the IdP;
- Pass this access_token to Keystone to retrieve a subject_token;
- Use this subject_token to then generate the authentication_
The problem is that in a federation with many IdPs, the Keystone WSGI protected endpoint needs more information than just the access_token, it needs to know which IdP the user wants to use.
Configurations
==============
export OS_PROJECT_
export OS_PROJECT_
export OS_PROJECT_
export OS_AUTH_URL=http://
export OS_INTERFACE=
export OS_IDENTITY_
export OS_REGION_
export OS_AUTH_
export OS_AUTH_
export OS_USERNAME=
export OS_PASSWORD=
export OS_IDENTITY_
export OS_CLIENT_
export OS_CLIENT_
export OS_OPENID_
export OS_PROTOCOL=openid
export OS_ACCESS_
export OS_ACCESS_
export OS_DISCOVERY_
Fix proposed to branch: master /review. opendev. org/692140
Review: https:/