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

interpolation support for access-control.properties #4854

Merged
merged 1 commit into from Aug 19, 2020

Conversation

dheerajkulakarni
Copy link
Member

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}

@cla-bot
Copy link

cla-bot bot commented Aug 16, 2020

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.

Copy link
Member

@kokosing kokosing left a 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"));
Copy link
Member

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));

Copy link
Member Author

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.

@kokosing
Copy link
Member

Please sign the CLA, this is required in order to merge your changes. Please follow: https://github.com/prestosql/cla

@cla-bot
Copy link

cla-bot bot commented Aug 17, 2020

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.

Copy link
Member

@kokosing kokosing left a 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();
Copy link
Member

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.

Copy link
Member Author

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?

@cla-bot
Copy link

cla-bot bot commented Aug 18, 2020

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
Copy link

cla-bot bot commented Aug 18, 2020

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.

@martint
Copy link
Member

martint commented Aug 18, 2020

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Aug 18, 2020
@cla-bot
Copy link

cla-bot bot commented Aug 18, 2020

The cla-bot has been summoned, and re-checked this pull request!

@kokosing kokosing merged commit 1568436 into trinodb:master Aug 19, 2020
@kokosing
Copy link
Member

Merged, thanks!

@kokosing kokosing mentioned this pull request Aug 19, 2020
9 tasks
@martint martint added this to the 341 milestone Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants