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

Feature ROW_LEVEL_SECURITY not working #13188

Closed
3 tasks done
carobaldino opened this issue Feb 17, 2021 · 3 comments
Closed
3 tasks done

Feature ROW_LEVEL_SECURITY not working #13188

carobaldino opened this issue Feb 17, 2021 · 3 comments
Labels
#bug Bug report

Comments

@carobaldino
Copy link

carobaldino commented Feb 17, 2021

According to the documentation here and to this PR, ROW_LEVEL_SECURITY flag has been moved to FEATURE_FLAGS.
I have tried to add the flag into my superset_config.py, but it is not working. I do have others flags in the configuration file that are already working (such as FAVICONS, and APP_ICON), and logs says conf file is loading properly, so I think the problem is not related to the file itself.

I've tried the following with no success:

FEATURE_FLAGS = {
    'ROW_LEVEL_SECURITY': True,
    'ALERT_REPORTS': True
}

DEFAULT_FEATURE_FLAGS = {
    'ROW_LEVEL_SECURITY': True,
    'ALERT_REPORTS': True
}

Expected results

Given the above configuration, I expect seeing the Rol Level Security and Alerts options under Settings Menu.

Actual results

image

Environment

  • docker version: 20.10.3
  • docker image: apache/superset:1.0.1
  • superset version: 1.0.1
  • python version: The one included in the docker image
  • node.js version: The one included in the docker image

How to reproduce the bug

  1. Run
docker run -v "${PATH_TO_SUPERSET_CONFIG}":/app/pythonpath/superset_config.py \
                  -p <host_port>:<docker_port> \
                  --name superset-dev \
                  apache/superset:1.0.1
  1. Create admin user
docker exec -it superset-dev superset fab create-admin \
               --username admin \
               --firstname Superset \
               --lastname Admin \
               --email admin@superset.com \
               --password admin

  1. Migrate local superset DB to latest
docker exec -it superset-dev superset db upgrade
  1. Load examples
docker exec -it superset-dev superset load_examples
  1. Initialize superset
docker exec -it superset-dev superset init
  1. Check your app in localhost:<your_port>, login with admin admin and drop down the Settings Menu.

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.
@carobaldino carobaldino added the #bug Bug report label Feb 17, 2021
@villebro
Copy link
Member

villebro commented Feb 17, 2021

Edit: you probably need to add the environment variable SUPERSET_CONFIG_PATH when running superset init. Something like:

docker exec -it -e SUPERSET_CONFIG_PATH="/app/pythonpath/superset_config.py" superset-dev superset init

(I didn't test this)

@carobaldino
Copy link
Author

carobaldino commented Feb 17, 2021

Thank you very much @villebro !

Running superset init fixed my problem. But it brings me a question.. should I run superset init each time I modify my superset_config.py?

Thank you! ❤️

Note: in my case, it worked even without the enviroment variable -e SUPERSET_CONFIG_PATH="/app/pythonpath/superset_config.py"

@villebro
Copy link
Member

Running superset init fixed my problem. But it brings me a question.. should I run superset init each time I modify my superset_config.py?

Not usually, no. Some feature flags, like the RLS one, populate asditional permissions that won't otherwise get populated. But this is actually a very good point, and one we could bring up in the documentation to highlight which flags require rerunning superset init.

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

No branches or pull requests

2 participants