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

chore: improve schema validation #1712

Merged
merged 1 commit into from
Oct 12, 2021
Merged

chore: improve schema validation #1712

merged 1 commit into from
Oct 12, 2021

Conversation

dpgaspar
Copy link
Owner

Description

Improves schema validation and adds optional flag for allowing alternative providers

ADDITIONAL INFORMATION

  • Has associated issue:
  • Is CRUD MVC related.
  • Is Auth, RBAC security related.
  • Changes the security db schema.
  • Introduces new feature
  • Removes existing feature

@dpgaspar dpgaspar merged commit eba517a into master Oct 12, 2021
@dpgaspar dpgaspar deleted the fix/rest-api-login branch October 12, 2021 14:31
This was referenced Oct 13, 2021
@harshach
Copy link

harshach commented Dec 9, 2021

hi @dpgaspar this schema validation is causing an issue in our applications

 File "python3.9/site-packages/flask_appbuilder/security/schemas.py", line 24, in validate_provider
    if not current_app.appbuilder.sm.api_login_allow_multiple_providers:
AttributeError: 'AirflowSecurityManager' object has no attribute 'api_login_allow_multiple_providers'

can this be gated with

if hasattr(current_app.appbuilder.sm, 'api_login_allow_multiple_providers') and not current_app.appbuilder.sm.api_login_allow_multiple_providers:

or do you see any better fixes on the application side. Thanks

@jedcunningham
Copy link
Contributor

Hey @harshach, Airflow maintainer here. I'm curious what use cases you have that require you to hit that /login endpoint? I'm considering disabling it by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants