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

Implementation of Form Authentication #155

Merged
merged 8 commits into from
Oct 19, 2023

Conversation

phantomjinx
Copy link
Member

@phantomjinx phantomjinx commented Oct 12, 2023

Merging of this is dependent on a version of hawtio-next that includes the PR #607 being released.

* management-api
 * Upgrades jolokia.js to same 2.0 version
 * Updates to reflect jolokia API
* First implementation assumed only Openshift. Adds form-based as well

* Fronts with new OAuthService which reads the config and determines
  which delegate / protocol service should be initialised; either 'form'
  or 'openshift'

* Maps out basics of FormService though not yet implemented but more
  importantly ensures that the existing OSOAuthService still correctly
  logs in and out.
* Extends webpack config to handle
 * env vars for either form or oauth authentication
 * routing via either external locations or react internal routes

* Fixes hawtconfig logo url

* form-service.ts
 * Fully implemented service that redirects to the login page if no token

* .../login/*.tsx
 * Provides customised login component page that only has input for token
   so re-models the LoginForm to only have a token input textbox

* index.ts
 * Adds Hawtio Plugin that acts as a login provider where the given
   component provide the login form

* utils/fetch.ts
 * Extends fetchPath to add optional headers

* tsup.config.ts / types.d.ts
 * Enables compilation and inclusion of svg and other media files

* Adds jest testing scaffolding and JWT Decode tests
* Provides template functionality for hawtio-online app

* Clones non-exported components from hawtio-next to ensure that form
  based login is working correctly
…wtio#151)

* kubernetes-api
 * Small changes reflecting changes in handling of metadata values

* kubernetes-api-app
 * Clones the changes made to the oauth-api-app to support login page from
   form authentication
…wtio#151)

* management-api
 * Adds in error handling if kubernetes-api is in error state. Do not
   continue trying to get pods but return intialised.
 * This allows the /login page to properly be displayed with no uncaught
   thrown errors. Once login takes place then the redirect re-initialises
   eveything

* management-api-app
 * Clones the changes made to the oauth-api-app to support login page from
   form authentication
 * Adds in colour styling for the pod management json - red if there is an
   error; blue otherwise
 * Adds possible explanations for possible failures to remind in the future
   possible avenues why things might be going wrong
* Adds scaffolding previously implemented in test-apps to enable form
  authentication
@phantomjinx
Copy link
Member Author

Note: Tests will remain in a failed state until the release of a new version of hawtio-next that supports required changes in API.

@phantomjinx phantomjinx marked this pull request as ready for review October 16, 2023 10:39
@phantomjinx
Copy link
Member Author

hawtio/hawtio-next#607 now merged.

Needs to be updated with new release version of hawtio/react once latter is made.

@tadayosi
Copy link
Member

@phantomjinx hawtio/react v0.6.0 is already released so you can use it. However, I found an issue that it restarts the jolokia instance everytime the jolokia service getJolokia() is invoked. We need to release v0.6.1 soon that fixes it.

@phantomjinx
Copy link
Member Author

@phantomjinx hawtio/react v0.6.0 is already released so you can use it. However, I found an issue that it restarts the jolokia instance everytime the jolokia service getJolokia() is invoked. We need to release v0.6.1 soon that fixes it.

Did you mean getJolokiaUrl()? Do you want me to fix this?

Updating hawtio-online presently. Thx!

@tadayosi
Copy link
Member

@phantomjinx Already fixed it with v0.6.1.

@phantomjinx
Copy link
Member Author

Now upgraded dependency to @hawtio/react 0.6.1

@phantomjinx phantomjinx merged commit 0ecceba into hawtio:main Oct 19, 2023
2 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.

2 participants