Skip to content

KARAF-4917 Support dynamicaliy registered configurations in RBAC#275

Closed
zregvart wants to merge 1 commit intoapache:masterfrom
zregvart:master
Closed

KARAF-4917 Support dynamicaliy registered configurations in RBAC#275
zregvart wants to merge 1 commit intoapache:masterfrom
zregvart:master

Conversation

@zregvart
Copy link
Member

@zregvart zregvart commented Jan 3, 2017

When adding configuration at runtime through
ConfigurationAdmin#createFactoryConfiguration Apache Felix appends
random UUID to the Configuration PID [1][2].

In order for those to be considered by getRequiredRoles that random
UUID needs to be removed in comparison performed by getGeneralPid.

[1] https://github.com/apache/felix/blob/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java#L397-L400
[2] https://github.com/apache/felix/blob/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java#L1093-L1137

When adding configuration at runtime through
ConfigurationAdmin#createFactoryConfiguration Apache Felix appends
random UUID to the Configuration PID [1][2]. In order for those to be
considered by `getRequiredRoles` that random UUID needs to be removed in
comparison performed by `getGeneralPid`.

[1] https://github.com/apache/felix/blob/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java#L397-L400
[2] https://github.com/apache/felix/blob/trunk/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java#L1093-L1137
@jbonofre
Copy link
Member

jbonofre commented Jan 3, 2017

R: @jbonofre

@zregvart
Copy link
Member Author

zregvart commented Jan 4, 2017

As per discussion in [KARAF-4917|https://issues.apache.org/jira/browse/KARAF-4917] one should use getConfiguration instead of createFactoryConfiguration to dynamically configure RBAC.

@zregvart zregvart closed this Jan 4, 2017
JiriOndrusek pushed a commit to JiriOndrusek/karaf-1 that referenced this pull request Apr 17, 2019
[ENTESB-8225] Console unusable in docker
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