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

Initializing SECURE_RANDOM at the runtime #486

Merged
merged 1 commit into from Aug 9, 2022

Conversation

javaduke
Copy link
Contributor

@javaduke javaduke commented Aug 9, 2022

I don't really know if this is a right thing to do but it resolves the problem described here #485 and apache/camel-quarkus#3966

@shumonsharif
Copy link
Contributor

Hi @javaduke Thanks for the PR! This looks perfectly acceptable to me. The intent with the original code was to switch the SECURE_RANDOM initialization by moving it from the static initializer block into the XMLSecurityConstants constructor. Your PR moves it down to the generateBytes method, which should also be fine.

When do you need this to be released?

@shumonsharif shumonsharif merged commit 1ca9373 into quarkiverse:master Aug 9, 2022
@javaduke
Copy link
Contributor Author

Awesome, thank you very much!!! It would be nice to release it soon, but I guess we can wait a few days, let me ask when is the next Camel Quarkus release is planned and I'll let you know.

@ppalaga
Copy link
Contributor

ppalaga commented Aug 10, 2022

@ppalaga
Copy link
Contributor

ppalaga commented Aug 10, 2022

I'd like to check whether we could avoid the substitutions in quarkus-cxf somehow. Substitutions tend to be fragile and hard to maintain in the long term.

@shumonsharif
Copy link
Contributor

I'd like to check whether we could avoid the substitutions in quarkus-cxf somehow. Substitutions tend to be fragile and hard to maintain in the long term.

I completely agree that we should avoid substitutions if at all possible, but this was the only solution I could come up with, given XMLSecurityConstants initializes SECURE_RANDOM in it's static initializer block.
https://github.com/apache/santuario-xml-security-java/blob/2.3.x-fixes/src/main/java/org/apache/xml/security/stax/ext/XMLSecurityConstants.java#L51

Open to suggestions though, in case there may be a better way to handle this. I will drop a release tomorrow, but let me know in case I should hold off.

@ppalaga
Copy link
Contributor

ppalaga commented Aug 10, 2022

Hold off please. I am working on some changes.

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.

None yet

3 participants