-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat(credentials): add credentials test endpoint #1432
Conversation
Test image available:
|
src/main/java/io/cryostat/net/web/http/api/beta/CredentialTestPostHandler.java
Outdated
Show resolved
Hide resolved
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.
Looks good to me! Any tests planned?
Right, I will write some tests, almost forgot. |
src/main/java/io/cryostat/net/web/http/api/beta/CredentialTestPostHandler.java
Outdated
Show resolved
Hide resolved
Test image available:
|
Test image available:
|
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.
Looks good to me!
src/main/java/io/cryostat/net/web/http/api/beta/CredentialTestPostHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Max Cao <macao@redhat.com>
Signed-off-by: Max Cao <macao@redhat.com>
Signed-off-by: Max Cao <macao@redhat.com>
Signed-off-by: Max Cao <macao@redhat.com>
Signed-off-by: Max Cao <macao@redhat.com>
Signed-off-by: Max Cao <macao@redhat.com>
Signed-off-by: Max Cao <macao@redhat.com>
79d3bb1
to
97f87cc
Compare
I've updated the pr. I believe the failure comes from here https://github.com/cryostatio/cryostat/blob/main/src/main/java/io/cryostat/net/AgentClient.java#L234 It seems the AgentConnection |
I'm not sure what should happen with agent testing credentials though. As of now, if the credentials the agent uses are deleted, any tests will result in an Do these interactions make sense? |
I think adding a nullcheck at line 232 there makes sense. This still probably just ends up in a
Sure, it makes enough sense for now. It's a bit late to do for 2.3, but early in the next development cycle I think it would be good to tackle this and make the |
Test image available:
|
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit --amend --signoff
Fixes: #1431
Description of the change:
Adds an endpoint to specifically test JMX connection w/credentials to a target JVM at
/beta/credentials/:targetId
The endpoint from the backend should query these targets themselves with the supplied credentials, and give a resulting output as the response body.
They should return status=
NA
for "this target does not need credentials, status=SUCCESS
, this target is authenticated with these supplied credentials, and status=FAILURE
, which means these credentials can not be authenticated with these credentials.Motivation for the change:
See #1431
How to manually test:
Try on target that doesn't need credentials as well: e.g.
9093 vertx-fib-demo