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

[#4] no login, token transferred to the broker #3

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

lavocatt
Copy link
Collaborator

@lavocatt lavocatt commented Dec 12, 2024

The jolokia api server is now in a mode where it doesn't perform
any login verification and just forward the Bearer token to the broker.
The user needs to provide a targetEndpoint and a Bearer token on every
request except api-info.

lavocatt added a commit to lavocatt/activemq-artemis-self-provisioning-plugin that referenced this pull request Dec 12, 2024
The new jolokia api server doesn't require to login to access its
services but requires to have a bearer token passed onto every requests
alongside the actual jolokia endpoint that is the target of the request.

This PoC uses these new information and strips down the previous login
phase we had.

Since I haven't updated the readme yet, here are the information that
you need to run this successfully:

* first you need to login to you oc env
* then go in the folder 'bridge-auth-https' and run ./setup.sh
* in one terminal run `yarn start-tls` and in another one `yarn
  start-console-tls`, you need to be in tls mode for this to work for
  now, I'll debug later the http version.
* then head out to the PoC PR for the jolokia api server and build & run
  it as usual arkmq-org/activemq-artemis-jolokia-api-server#3

Let me know how it goes!
@lavocatt lavocatt force-pushed the poc-read-token branch 2 times, most recently from 3626508 to 3f4a8d2 Compare December 16, 2024 16:39
lavocatt added a commit to lavocatt/activemq-artemis-self-provisioning-plugin that referenced this pull request Dec 16, 2024
The new jolokia api server doesn't require to login to access its
services but requires to have a bearer token passed onto every requests
alongside the actual jolokia endpoint that is the target of the request.

This PoC uses these new information and strips down the previous login
phase we had.

Since I haven't updated the readme yet, here are the information that
you need to run this successfully:

* first you need to login to you oc env
* then go in the folder 'bridge-auth-https' and run ./setup.sh
* in one terminal run `yarn start-tls` and in another one `yarn
  start-console-tls`, you need to be in tls mode for this to work for
  now, I'll debug later the http version.
* then head out to the PoC PR for the jolokia api server and build & run
  it as usual arkmq-org/activemq-artemis-jolokia-api-server#3

Let me know how it goes!
@lavocatt lavocatt changed the title WIP: no login, token transferred to the broker [#4] no login, token transferred to the broker Dec 18, 2024
@lavocatt lavocatt marked this pull request as ready for review December 18, 2024 16:19
src/api/apiutil/artemis_jolokia.ts Dismissed Show resolved Hide resolved
src/utils/server.test.ts Dismissed Show dismissed Hide dismissed
src/utils/server.test.ts Dismissed Show dismissed Hide dismissed
@lavocatt lavocatt force-pushed the poc-read-token branch 2 times, most recently from 91c3c94 to 30406c5 Compare December 18, 2024 17:09
The jolokia api server is now in a mode where it doesn't perform
any login verification and just forward the Bearer token to the broker.
The user needs to provide a targetEndpoint and a Bearer token on every
request except api-info.

Based on @gaohoward's work there: artemiscloud#23
Copy link

@Msarawan Msarawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! nice work

@lavocatt lavocatt merged commit 58e4f7e into arkmq-org:main Jan 8, 2025
5 checks passed
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.

3 participants