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
interpolation support for access-control.properties #4854
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@prestosql.io. For more information, see https://github.com/prestosql/cla. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash your commits.
interpolation
word could be a bit misleading here. How about using the below for commit message:
Allow to configure refresh period with environment variables
?
@@ -138,13 +140,20 @@ public SystemAccessControl create(Map<String, String> config) | |||
{ | |||
requireNonNull(config, "config is null"); | |||
|
|||
String configFileName = config.get(SECURITY_CONFIG_FILE); | |||
Bootstrap bootstrap = new Bootstrap( | |||
new FileBasedAccessControlModule("fileBasedSystemAccessControlFactory")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This module is for connector level access control. Please do not use it here. Instead please:
new Bootstrap(() -> configBinder(binder).bindConfig(FileBasedAccessControlConfig.class));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @kokosing , I have updated the pull request with suggested changes and about the CLA I already sent a mail attaching CLA pdf document filling the details and signing it.
Please sign the CLA, this is required in order to merge your changes. Please follow: https://github.com/prestosql/cla |
b0cbdc6
to
fc95a0f
Compare
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@prestosql.io. For more information, see https://github.com/prestosql/cla. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
% one minor comment
.setRequiredConfigurationProperties(config) | ||
.initialize(); | ||
FileBasedAccessControlConfig fileBasedAccessControlConfig = injector.getInstance(FileBasedAccessControlConfig.class); | ||
String configFileName = fileBasedAccessControlConfig.getConfigFile(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getConfigFile
has @NotNull
validation so the check below is not needed and can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @kokosing , I have done this change. can we merge this pull request?
fc95a0f
to
3f6ebf7
Compare
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@prestosql.io. For more information, see https://github.com/prestosql/cla. |
3f6ebf7
to
adbabc5
Compare
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@prestosql.io. For more information, see https://github.com/prestosql/cla. |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
Merged, thanks! |
This pull request is to add interpolation support for access-control.properties file as mentioned in the ticket
#4700
example :
property can be directly given as below for using environment variables in the properties file
security.refresh-period=${ENV:PRESTO_REFRESH_PERIOD}