-
Notifications
You must be signed in to change notification settings - Fork 572
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
[incubator-kie-issues-994] kafka auth feature with message header records #3037
[incubator-kie-issues-994] kafka auth feature with message header records #3037
Conversation
...ices-common/src/main/resources/META-INF/services/org.kie.server.api.security.SecurityAdapter
Outdated
Show resolved
Hide resolved
"-keyalg", "RSA", | ||
"-alias", KEYSTORE_ALIAS, | ||
"-keystore", KEYSTORE_PATH, | ||
"-storepass", KEYSTORE_PWD, |
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 needed to add
"-keypass", KEYSTORE_PWD,
otherwise the test was hanging for me infinitely.
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.
yeah after java 8 the keypass is mandatory. my bad for testing only in java 8
ProcessBuilder builder = new ProcessBuilder(); | ||
builder.command(cmd); | ||
Process p = builder.start(); | ||
p.waitFor(); |
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.
Perhaps better to add a timeout:
p.waitFor(10L, TimeUnit.SECONDS);
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.
done
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
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.
Great work @elguardian
I successfully tested the following scenarios:
- Message with kie_user, kie_password headers - works with default security configuration
- Message with kie_token header
The tricky part is to create a working JWT token, perhaps we could help by providing a helper class to create it using a defined keystore, wdyt?
Where do you propose to use do that ¿? I don't know what they are using in the kafka producer or how do they plan to do it ? here you have how to do it. (empty token) but not sure what else we can do honestly. |
…ords (kiegroup#3037) * integration java-jwt for kafka and inmemory thing * add security and integration check with RSA * keystore helpers
issue: apache/incubator-kie-issues#994
depends on: kiegroup/droolsjbpm-build-bootstrap#2440