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

fail to validate after update acl #3887

Closed
yuz10 opened this issue Feb 24, 2022 · 0 comments
Closed

fail to validate after update acl #3887

yuz10 opened this issue Feb 24, 2022 · 0 comments

Comments

@yuz10
Copy link
Member

yuz10 commented Feb 24, 2022

BUG REPORT

  1. Please describe the issue you observed:
  • What did you do (The steps to reproduce)?
  1. call updateAccessConfig to update acl
  2. do acl validation using the new acl
  • What did you expect to see?

  • What did you see instead?
    see the error:

java.lang.NullPointerException
	at org.apache.rocketmq.acl.plain.PlainPermissionManager.validate(PlainPermissionManager.java:646)
	at org.apache.rocketmq.acl.plain.PlainAccessValidator.validate(PlainAccessValidator.java:141)
	at org.apache.rocketmq.acl.plain.PlainAccessValidatorTest.testValidateAfterUpdateAccessConfig(PlainAccessValidatorTest.java:942)
  1. Please tell us about your environment:

  2. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
    after update acl, the file watcher will call load() function, the plainAccessResourceMap will not put new acl because the condition this.accessKeyTable.get(plainAccessResource.getAccessKey()) is not null

                if (this.accessKeyTable.get(plainAccessResource.getAccessKey()) == null) {
                    plainAccessResourceMap.put(plainAccessResource.getAccessKey(), plainAccessResource);
                    this.accessKeyTable.put(plainAccessResource.getAccessKey(), aclFilePath);
                }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants