Allow OAuth and OIDC login engines to bind to fields in internal auth
This feature is subtle but very important: Currently, when a user logs in via an "external" auth system (such as Github), they are either logged into an existing bound account or a new account is created for them in the database. While this normally works jut fine, it hits a roadblock when the *internal* auth system configured is not the database, but instead something like LDAP. In that case, *most* Enterprise customers will prefer that logging in via external auth (like OIDC) will also *automatically* bind the newly created account to the backing *internal* auth account. For example, login via PingFederate OIDC (backed by LDAP) should also bind the new QE account to the associated LDAP account, via either username or email. This change allows for this binding field to be specified, and thereafter will perform the proper lookups and bindings.
This commit is contained in:
parent
c6b0376d61
commit
2c35383724
5 changed files with 315 additions and 59 deletions
0
endpoints/api/test/__init__.py
Normal file
0
endpoints/api/test/__init__.py
Normal file
|
@ -11,8 +11,10 @@ from data import model
|
|||
from data.database import (close_db_filter, db)
|
||||
from data.model.user import LoginWrappedDBUser
|
||||
from endpoints.api import api_bp
|
||||
from endpoints.web import web
|
||||
|
||||
from initdb import initialize_database, populate_database
|
||||
from path_converters import APIRepositoryPathConverter, RegexConverter
|
||||
from path_converters import APIRepositoryPathConverter, RegexConverter, RepositoryPathConverter
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
|
@ -33,7 +35,9 @@ def app(appconfig):
|
|||
|
||||
app.url_map.converters['regex'] = RegexConverter
|
||||
app.url_map.converters['apirepopath'] = APIRepositoryPathConverter
|
||||
app.url_map.converters['repopath'] = RepositoryPathConverter
|
||||
app.register_blueprint(api_bp, url_prefix='/api')
|
||||
app.register_blueprint(web, url_prefix='/')
|
||||
app.config.update(appconfig)
|
||||
return app
|
||||
|
||||
|
|
Reference in a new issue