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

feat(docker): Add support LDAP/AD authorization #24277

Merged
merged 2 commits into from
Jun 23, 2023
Merged

feat(docker): Add support LDAP/AD authorization #24277

merged 2 commits into from
Jun 23, 2023

Conversation

alekseyolg
Copy link
Contributor

Add support LDAP/AD authorization

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@alekseyolg alekseyolg changed the title chore(docker): Add support LDAP/AD authorization feat(docker): Add support LDAP/AD authorization Jun 2, 2023
@alekseyolg
Copy link
Contributor Author

@craig-rueda Hello!
Please see the PR, I tried to make a useful suggestion!

@@ -18,9 +18,11 @@
#
-r base.in
-e .[cors,druid,hive,mysql,postgres,thumbnails]
Authlib==1.2.0
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, we can't add authlib to superset as its license doesn't allow it. :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@craig-rueda Thanks for the note, the library has been replaced by oauthlib!

#
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile-multi
#
-r base.txt
-e file:.
-e file:///tmp/superset
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't look right

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@craig-rueda Thanks, this bug has been fixed!

@alekseyolg
Copy link
Contributor Author

@craig-rueda Hello!
All comments were promptly corrected!

@craig-rueda
Copy link
Member

@dpgaspar - do these libs look ok to you?

@@ -66,6 +64,8 @@ mccabe==0.6.1
# via pylint
mysqlclient==2.1.0
# via apache-superset
oauthlib==3.2.2
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need oauthlib for LDAP

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I checked - this library is really not needed for ldap to work, after its removal, LDAP works correctly.
Removed from PR.
Thanks for the help!

@alekseyolg
Copy link
Contributor Author

Hello @dpgaspar! Thanks for your help writing this code!
If there are no more suggestions to improve our offer, then please give an approval for this pull request!

@alekseyolg
Copy link
Contributor Author

@craig-rueda Hello!
Are there any other suggestions to improve the code?
This code will be useful to many users!

@craig-rueda
Copy link
Member

Looks like oauthlib is still in the requirements. I think @dpgaspar mentioned that it wasn't necessary.

(docker): Add support LDAP/AD authorization
@alekseyolg
Copy link
Contributor Author

@craig-rueda Thanks for pointing out my mistake, apparently I forgot to add the appropriate commit.
This oversight has been corrected.

@alekseyolg
Copy link
Contributor Author

@craig-rueda Apparently, my code breaks the tests, if I correctly understood the principle of their work, then the last commit should solve the problem with the tests!

@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Merging #24277 (4c2363e) into master (1d9a761) will increase coverage by 0.73%.
The diff coverage is 73.62%.

❗ Current head 4c2363e differs from pull request most recent head c11344b. Consider uploading reports for the commit c11344b to get more accurate results

@@            Coverage Diff             @@
##           master   #24277      +/-   ##
==========================================
+ Coverage   68.29%   69.03%   +0.73%     
==========================================
  Files        1957     1901      -56     
  Lines       75624    74006    -1618     
  Branches     8223     8115     -108     
==========================================
- Hits        51649    51088     -561     
+ Misses      21867    20807    -1060     
- Partials     2108     2111       +3     
Flag Coverage Δ
hive 53.89% <ø> (+0.50%) ⬆️
javascript 55.64% <73.62%> (+0.91%) ⬆️
mysql 79.41% <ø> (?)
postgres 79.50% <ø> (+0.50%) ⬆️
presto 53.79% <ø> (+0.47%) ⬆️
python 83.49% <ø> (+0.70%) ⬆️
sqlite 78.00% <ø> (+0.46%) ⬆️
unit 54.65% <ø> (+1.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ckages/superset-ui-chart-controls/src/constants.ts 100.00% <ø> (ø)
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
...erset-ui-chart-controls/src/utils/columnChoices.ts 100.00% <ø> (ø)
...ges/superset-ui-core/src/query/buildQueryObject.ts 100.00% <ø> (ø)
...packages/superset-ui-core/src/query/types/Query.ts 100.00% <ø> (ø)
...set-ui-core/src/ui-overrides/ExtensionsRegistry.ts 100.00% <ø> (ø)
...acy-preset-chart-deckgl/src/components/Tooltip.tsx 0.00% <0.00%> (ø)
...preset-chart-deckgl/src/layers/Geojson/Geojson.jsx 0.00% <0.00%> (ø)
...et-chart-deckgl/src/layers/Geojson/controlPanel.ts 50.00% <ø> (ø)
...preset-chart-deckgl/src/layers/Scatter/Scatter.jsx 0.00% <0.00%> (ø)
... and 51 more

... and 185 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@craig-rueda craig-rueda merged commit 291a10f into apache:master Jun 23, 2023
26 checks passed
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants