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
[WFLY-15452] - allow specifying AJP_ALLOWED_REQUEST_ATTRIBUTES_PATTERN #14789
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baranowb I think you need a transformers tests (apologies if there is one and I missed it).
Also, you need to bump UndertowExtension.CURRENT_MODEL_VERSION, since 11.0.0 has already been in a release and you're changing the model
@baranowb Yes, bumping the xml was good - you also need to bump the management model version. |
@kabir Uh, missed that, but it seems to be a fallout from previous bump, as current was 12, not 11. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked if there is need to update the community documentation in WF as well (in docs dir)?
@@ -79,7 +79,7 @@ | |||
static final AccessConstraintDefinition LISTENER_CONSTRAINT = new SensitiveTargetAccessConstraintDefinition( | |||
new SensitivityClassification(SUBSYSTEM_NAME, "web-connector", false, false, false)); | |||
|
|||
private static final ModelVersion CURRENT_MODEL_VERSION = ModelVersion.create(11, 0, 0); | |||
private static final ModelVersion CURRENT_MODEL_VERSION = ModelVersion.create(12, 1, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, indeed, I missed that in the previous commit!
/** | ||
* @author <a href="mailto:tomaz.cerar@redhat.com">Tomaz Cerar</a> (c) 2012 Red Hat Inc. | ||
* @author Radoslav Husar | ||
* @author Flavia Rainone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add your name here, Bartosz, so people can easily see that you created this one
@@ -125,13 +126,23 @@ private static void registerTransformersWildFly18(ResourceTransformationDescript | |||
.getAttributeBuilder() | |||
.setValueConverter(AttributeConverter.DEFAULT_VALUE, CONNECTION_IDLE_TIMEOUT) | |||
.end(); | |||
subsystemBuilder.addChildResource(UndertowExtension.SERVER_PATH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be wrong, but I think transformation is applied in a chain when comparing to an old version, and if that's the case it is enough to add a discard to registerTransformersWildFly25, a new method, in the same way I did for OBFUSCATE_SESSION_ROUTE, have you checked it the tests pass that way?
In other words, registerTransformersWildFly25 would be applied to WF25 and all previous versions
.rejectChildResource(ConsoleAccessLogDefinition.INSTANCE.getPathElement()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same applies here to registerTranformersWildFly16, these changes might not be needed
@@ -155,6 +166,12 @@ private static void registerTransformers_EAP_7_2_0(ResourceTransformationDescrip | |||
.setDiscard(DiscardAttributeChecker.DEFAULT_VALUE, PRESERVE_PATH_ON_FORWARD) | |||
.addRejectCheck(RejectAttributeChecker.DEFINED, PRESERVE_PATH_ON_FORWARD) | |||
.end(); | |||
final ResourceTransformationDescriptionBuilder serverBuilder = subsystemBuilder.addChildResource(UndertowExtension.SERVER_PATH); | |||
|
|||
final AttributeTransformationDescriptionBuilder ajp = serverBuilder.addChildResource(UndertowExtension.AJP_LISTENER_PATH).getAttributeBuilder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same goes for the EAP. I think we need to add a registerTransformers_EAP_7_4_0 and discard it. I'm not sure the reject has any effect, after discarding it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im almost sure it had to be done, buy it might have been due to wrong current model. I will double check.
/** | ||
* Test for UndertowSubsystem with subsystem schema version 12.0. | ||
* | ||
* @author Flavia Rainone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add your name to the author list
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="max-ajp-packet-size" type="xs:int"/> | ||
<xs:attribute name="allowed-request-attributes-pattern" use="optional" type="xs:string"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, add a CDATA documenting it here as well
; | ||
|
||
/** | ||
* The current namespace version. | ||
*/ | ||
public static final Namespace CURRENT = UNDERTOW_12_0; | ||
public static final Namespace CURRENT = UNDERTOW_12_1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Historically we have been incrementing only the major version number for quite a while. It is intersting that you brought up this, though, because I see that Undertow has 1.1, 1.2 and 3.1. @bstansberry do we have any policies in WF as to when should we upgrade the major model version versus the minor one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fl4via @baranowb We should always do a major bump in WildFly main / WildFly Core main. That eliminates varying interpretations of what's 'minor' and leaves minor versions available for use in other streams if necessary.
I've never gotten a sense that people are trying to get semantic meaning from our API/schema versions so there's not much downside to just doing majors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bstansberry roger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For changes like this it is clearer both now and in the future to separate the version bump into it's own separate commit, when the two are combined like this it is not possible to use the GitHub UI or git diff tools later to identify the changes made to the schema.
Added "missing_reqs" as the requirements for a feature request have not been met. Also related to my comment about the schema version etc.. I see you have a second PR also duplicating the changes - this is another reason to use a separate commit for the bump - both RFEs can then continue from the same commit reducing the scope for conflict. |
Yes. AFAIR there is no documentation that covers atttribs now, its all generated from model and descriptor files as "model reference. |
44571b8
to
f1c5113
Compare
fb63e03
to
68f05b7
Compare
In fact, you're right. |
Hello, baranowb. I'm waiting for one of the admins to verify this patch with /ok-to-test in a comment. |
Removed label after rebase. |
Issue: https://issues.redhat.com/browse/WFLY-15452
More information about the wildfly-bot[bot]