-
Notifications
You must be signed in to change notification settings - Fork 20
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(cred): credential test table #920
Conversation
Test image available:
|
Test image available:
|
Test image available:
|
Test image available:
|
Test image available:
|
Test image available:
|
Test image available:
|
Try hover over the valid label. It should say some warning :)) Any suggestion for that?
Was thinking about it but it seems quite hard. The way it validates credentials now is to fetch active recordings while putting the credentials in I could try sending an initial check with some very random bad username/password. However, no guarantee it is not being used, maybe we can utilize empty username/password? |
The only thing I can think of right now, is to send a graphql request to each of the targets with the form query {
targetNodes {
mbeanMetrics {
runtime {
inputArguments
}
}
}
} and then parse the resulting array for the input argument:
and checking if it Not sure if there are better ways. The query should fail if the credentials are wrong anyways since we are calling the remote mxbean on the target, so it would be similar to getting the recordings in terms of checking if credentials work. EDIT: Apprently that authenticate property is default true, so I assume if it doesn't exist, the jvm should need auth. |
I think the hint is wrong, there is no longer a target select dropdown here. There is also no context object. Should there be a context object for the user? I think I would find it hard to know what the match expression should include. The |
Oh niceee! Sounds good I will redirect to this approach :))
Ahh the hint is basically constructed from any target (i.e. first one). It just serves as an overall and simple hint for arbitrary target similar to before. It is this way cuz now we don't have target dropdown anymore. EDIT: I seee now! U mean the input helper text. Thanks!
We can include all fields but would it be too clustered? There is also a property path hint when hovering over the field name in the detail sidecar. We can always add a quickstart/guide for this? What do you think? |
Test image available:
|
Test image available:
|
This feels a little fragile... https://docs.oracle.com/javadb/10.10.1.2/adminguide/radminjmxenablepwd.html#radminjmxenablepwd I would need to do a lot more checking of different docs for different JDK versions, but I would hesitate to say that If we are able to make this query and determine the Why don't we just have a connection checking endpoint that specifically does not load any stored credentials? It either uses only the session credentials header for the test, or it ignores the session credentials header and requires the credentials to test to be passed as part of the request body. We can use this endpoint and pass no credentials at first, and just try to open a JMX connection to read some basic MBean data. If that succeeds then we know the target did not require auth. Then the user can supply credentials and we can repeat the test using those. |
Test image available:
|
Test image available:
|
Test image available:
|
This PR/issue depends on:
|
Signed-off-by: Thuan Vo <thvo@redhat.com>
Test image available:
|
Signed-off-by: Thuan Vo <thvo@redhat.com>
Test image available:
|
Opps I got myself confused. It was the old implementation. Will remove that |
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 great to me! Awesome job.
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.
Awesome indeed.
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit --amend --signoff
Fixes: #592
Fixes: #593
Related to #914
Depends on https://github.com/cryostatio/cryostat/issues/1431
Description of the change:
Motivation for the change:
See #591
How to manually test:
Run CRYOSTAT_IMAGE=quay.io... sh smoketest.sh...
Screenshots
EDIT: See #920 (comment)