Use API authentication instead of token scraping - #379
Conversation
Add move methods to SupersetClient
Add new line
Reintroduce API authentication instead of token scraping
|
also unsure why the CI haven't completed, but hopefully that's fixed with a new commit |
|
@Vitor-Avila, can you test with db one? I've only validated with ldap. Thanks |
Vitor-Avila
left a comment
There was a problem hiding this comment.
Left some comments.
Tests are still failing as well, let me know if you can see the errors, or if you want me to share here.
Thanks!
Try the security API first; on failure, log a warning and use the previous BeautifulSoup-based /login/ flow so older Superset instances keep working. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
hey @Vitor-Avila, addressed the comments, added the fallback to html approach |
Rename mocker.patch return value from UsernamePasswordAuth to username_password_auth to satisfy snake_case style. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
hey @joaopamaral tests are failing, can you please review? Thanks! |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolve conflict in tests/cli/superset/main_test.py by adopting upstream's substring-based assertions for `superset export --help`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Sorry @Vitor-Avila, applied black formatting |
|
Hey @joaopamaral looking into taking this one to the finish line. I don't think I can write to your fork/branch, so I'm thinking about branch off of this to preserve your commits authorship. Let me know if you have any concerns. Thanks! |
Sure, no problem @Vitor-Avila! Thanks! |
Replace the HTML-scraping-based authentication with Superset's official security API endpoints.
Previously, UsernamePasswordAuth authenticated by:
This was fragile and dependent on Superset's frontend HTML structure. The new approach uses the documented REST API:
It was initially proposed in #319 (but I forgot to address the comments, sorry @Vitor-Avila)