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

AMBARI-26137:Add whitelist setting for host access control #3831

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

tyoushinya
Copy link
Contributor

What changes were proposed in this pull request?

Add a whitelist configuration setting to control which host will be allowed to access Ambari server.

How was this patch tested?

  1. Add a comma-separated whitelist setting(security.server.access.whitelist) in ambari.properties configuration file.
    Supported values are IP、hostname or IP range as following.
    host1,192.168.0.118-168,192.168.1.5
  2. Restart Ambari server
  3. You can try to access Ambari server. The configured hosts can access succeed, and others are forbidden.

@tyoushinya
Copy link
Contributor Author

@JiaLiangC Can you help review this PR? Thanks.
BTW, This feature has been deployed on our product environment. and everything works well until now.

Copy link
Contributor

@JiaLiangC JiaLiangC left a comment

Choose a reason for hiding this comment

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

1.Consider adding input validation for the whitelist entries to ensure they are valid IP addresses, hostnames, or IP ranges.

2.It might be helpful to add a log message when the whitelist is applied, indicating which hosts are allowed.

3.Consider adding unit tests for the new whitelist functionality.

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

Successfully merging this pull request may close these issues.

2 participants