Skip to content

Conversation

@mskacelik
Copy link
Contributor

issue: https://issues.redhat.com/browse/WFCORE-7258

Hopefully I applied correctly all the correctors.

Copy link
Contributor

@yersan yersan left a comment

Choose a reason for hiding this comment

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

@mskacelik Added some comments, notice that the ultimate goal here by moving the module name corrector to the attributes, is also to avoid parsing to the canonize form twice ... it is a bit tricky, so we need to closely review this

static final SimpleAttributeDefinition MODULE = new SimpleAttributeDefinitionBuilder(ElytronDescriptionConstants.MODULE, ModelType.STRING, true)
.setAttributeGroup(ElytronDescriptionConstants.CLASS_LOADING)
.setAllowExpression(false)
.setCorrector(ModuleIdentifierUtil.MODULE_NAME_CORRECTOR)
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the module will be provided now in a canonicalized form, apparently, we can now remove the canonicalization request done at

current = current.getModule(ModuleIdentifierUtil.parseCanonicalModuleIdentifier(module));

The only one I have in doubt is the invocation of that method from

@darranl What's your feeling about this? Would this configuration.get("module") always be in a canonicalized form? I've tried by finding the usages of the enclosing method, but it returns that there are no usages at all, so not sure from where this method gets invoked.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unless I am misreading this comment this sounds like a breaking change we can not make to the management model.

Is the call to parseCanonicalModuleIdentifier more permissive than ModuleIdentifierUtil.MODULE_NAME_CORRECTOR?

Copy link
Contributor

Choose a reason for hiding this comment

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

@darranl The ModuleIdentifierUtil.MODULE_NAME_CORRECTOR as an attribute corrector just moves the #parseCanonicalModuleIdentifier(String) to the attribute, so it will always return the canonicalized form of the module, see

/**
* A {@link ParameterCorrector} that {@link #parseCanonicalModuleIdentifier(String) canonicalizes}
* values that are meant to represent JBoss Modules module names.
*/
.

They are equivalents, but having it at the attribute level is preferred since it is supposed to be the entry of the user values.

Copy link
Contributor

Choose a reason for hiding this comment

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

The idea has always been to place this sort of conversions/adjustments as close as possible to the external inputs, hence on the attribute definitions via ModuleIdentifierUtil.MODULE_NAME_CORRECTOR, however, for this JaasCustomSecurityRealmWrapper.java class, which is indeed deprecated, I'm not sure what the external input is for this configuration object

@wildfly-ci

This comment was marked as outdated.

@yersan yersan requested a review from darranl December 9, 2025 16:08
Copy link
Contributor

@darranl darranl left a comment

Choose a reason for hiding this comment

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

This sounds at risk of being a breaking model change.

I think I would like to see test cases that demonstrate that working values that can be specified today will continue to work without error even where we previously relied on passing them through parseCanonicalModuleIdentifier

@darranl
Copy link
Contributor

darranl commented Dec 10, 2025

The part I would still like to confirm is, "Is there a chance that this is going to break previously valid configurations causing those to have model time validation errors as they migrate to the WildFly version that contains this?"

@yersan yersan added the 32.x PRs meant for 32.x (corresponding to WildFly 40.x) label Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

32.x PRs meant for 32.x (corresponding to WildFly 40.x)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants