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

fix(credentials): store credentials with unique matchExpression #156

Merged
merged 6 commits into from
Jun 21, 2023

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Jun 20, 2023

Fixes #154

tthvo
tthvo previously approved these changes Jun 20, 2023
Copy link
Member

@tthvo tthvo left a 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!

@andrewazores andrewazores changed the title fix(credentials): store credentials with expr matching callback and jvmId fix(credentials): store credentials with unique matchExpression Jun 20, 2023
Copy link
Member

@tthvo tthvo left a 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!

@maxcao13
Copy link
Member

maxcao13 commented Jun 20, 2023

Is it me, or do I still see the old format:

image

It should be both connectUrl + jvmId? These are quarkus-test:latest images I built from the PR.

Are these steps still applicable?

# cryostat-agent
mvn -DskipTests -Dspotless.check.skip install
cd ../quarkus-test
./mvnw -DskipTests -U package && podman build -t quay.io/andrewazores/quarkus-test:latest -f src/main/docker/Dockerfile.jvm .

@andrewazores
Copy link
Member Author

In the smoketest.sh there are quarkus-test and vertx-fib-demo that both have Cryostat Agent instances on them, so both of those container images would need to be updated to include these changes. There are three of the vertx-fib-demos so that probably matches the three old-style credentials you're seeing.

@tthvo
Copy link
Member

tthvo commented Jun 20, 2023

Just wondering it is also because the database is not pruned off those entries? I am seeing all formats.

Now that its noticed. Users that use the agent should probably be informed about this change and remove previous stored credentials???

image

@maxcao13
Copy link
Member

In the smoketest.sh there are quarkus-test and vertx-fib-demo that both have Cryostat Agent instances on them, so both of those container images would need to be updated to include these changes. There are three of the vertx-fib-demos so that probably matches the three old-style credentials you're seeing.

Hm... I still can't seem to figure it out, but if other people's are working than it probably is something I'm else I'm missing.

@andrewazores andrewazores merged commit 09987e0 into cryostatio:main Jun 21, 2023
mergify bot pushed a commit that referenced this pull request Jun 21, 2023
* fix(credentials): store credentials with expr matching callback and jvmId

* generate UUID for instance, include in alias/realm as well as platform annotation

* do not try to delete credentials if they have not yet been submitted

* document new config

* fix incorrect doc description

(cherry picked from commit 09987e0)
@andrewazores andrewazores deleted the gh154 branch June 21, 2023 15:07
andrewazores added a commit that referenced this pull request Jun 21, 2023
#160)

* fix(credentials): store credentials with expr matching callback and jvmId

* generate UUID for instance, include in alias/realm as well as platform annotation

* do not try to delete credentials if they have not yet been submitted

* document new config

* fix incorrect doc description

(cherry picked from commit 09987e0)

Co-authored-by: Andrew Azores <aazores@redhat.com>
@maxcao13
Copy link
Member

I figured out the problem. I was running sh smoketest.sh right after a mvn clean package in the base cryostat and I realized that the package lifecycle no longer builds an image with the tag 2.4.0-snapshot anymore, and that's what run.sh defaults to based on the pom.xml if CRYOSTAT_IMAGE isn't set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug] Server stored credentials should include JVM ID for uniqueness
3 participants