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

feat(jans-cli-tui): Support custom urls for Janssen services #7492

Open
wants to merge 10,000 commits into
base: main
Choose a base branch
from

Conversation

davispuh
Copy link
Contributor

Prepare


Description

Target issue

I can host Janssen services on any scheme://host:port/path combination but jans-cli won't be able to interact with them.

Implementation Details

This PR implements --auth_url, --config_url, --scim_url parameters that solves this limitation.
This change is fully backwards compatible since --host parameter is still kept which has lower precedence.

For example:

$ jans-cli-tui --config_url http://config.internal:8080/config --auth_url http://auth.internal:8080/auth --scim_url http://scim.internal:8080/scim

Test and Document the changes

  • Static code analysis has been run locally and issues have been fixed
  • Relevant unit and integration tests have been added/updated
  • Relevant documentation has been updated if any (i.e. user guides, installation and configuration guides, technical design docs etc)

@davispuh davispuh requested a review from devrimyatar as a code owner January 22, 2024 21:23
@ossdhaval ossdhaval added area-documentation Documentation needs to change as part of issue or PR comp-jans-cli-tui Component affected by issue or PR triaged Issue or PR is fully triaged priority-3 Issue or PR is relevant to core functions, but does not impede progress. Important, but not urgent enhancement labels Jan 23, 2024
@ossdhaval
Copy link
Contributor

Hi @davispuh, Thanks for submitting this PR. The code owner will review it soon. At the same time, I wanted to request you to add DCO, guidelines here, to your commits.

@ossdhaval ossdhaval requested a review from moabu January 23, 2024 05:41
@ossdhaval
Copy link
Contributor

Also, if this PR gets merged after the review, the documentation should be updated to reflect these additional switches.

moabu and others added 8 commits January 23, 2024 10:02
* ci: fix packages

Signed-off-by: moabu <47318409+moabu@users.noreply.github.com>

* ci: fix packages

Signed-off-by: moabu <47318409+moabu@users.noreply.github.com>

---------

Signed-off-by: moabu <47318409+moabu@users.noreply.github.com>
…ject#7498)

Bumps [anchore/scan-action](https://github.com/anchore/scan-action) from 3.3.7 to 3.6.1.
- [Release notes](https://github.com/anchore/scan-action/releases)
- [Changelog](https://github.com/anchore/scan-action/blob/main/CHANGELOG.md)
- [Commits](anchore/scan-action@62370b5...c35e932)

---
updated-dependencies:
- dependency-name: anchore/scan-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ject#7249)

Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.13.0 to 4.0.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@0ab4596...387ac29)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…nProject#7251)

Bumps [google-github-actions/release-please-action](https://github.com/google-github-actions/release-please-action) from 3.7.13 to 4.0.2.
- [Release notes](https://github.com/google-github-actions/release-please-action/releases)
- [Changelog](https://github.com/google-github-actions/release-please-action/blob/main/CHANGELOG.md)
- [Commits](google-github-actions/release-please-action@db8f2c6...cc61a07)

---
updated-dependencies:
- dependency-name: google-github-actions/release-please-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…oject#7250)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.1 to 5.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@65d7f2d...0a5c615)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
JanssenProject#7436)

Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 2.5.1 to 4.0.0.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](actions/dependency-review-action@0efb1d1...4901385)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps ubuntu from `6042500` to `e6173d4`.

---
updated-dependencies:
- dependency-name: ubuntu
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
This allows to host Janssen services on any `scheme://host:port/path` combination.
User can use `--auth_url`, `--config_url`, `--scim_url` flags to specify urls.

eg. `jans-cli-tui --config_url http://config.internal:8080/config --auth_url http://auth.internal:8080/auth --scim_url http://scim.internal:8080/scim`

Signed-off-by: Dāvis Mosāns <davispuh@gmail.com>
iromli and others added 17 commits March 21, 2024 22:29
* chore(deps): sync image assets and dependencies

Signed-off-by: iromli <isman.firmansyah@gmail.com>

* chore(deps): bump marshmallow to v3.21.1

Signed-off-by: iromli <isman.firmansyah@gmail.com>

---------

Signed-off-by: iromli <isman.firmansyah@gmail.com>
JanssenProject#8120)

feat(fido2): allow to update device data in SG authentication response JanssenProject#8116

Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
…JanssenProject#8035)

* feat(jans-auth-server): support for prompt=create JanssenProject#7899

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): added new custom script - createUser (prompt=create)

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): added prompt_values_supported to discovery page

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): injected new "create user" custom script into AS (prompt=create)

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): prompt=create check must be before user internal check

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* fix(jans-auth-server): fixed wrong references in createUser.xhtml (prompt=create)

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): prompt=create - pass all parameters from original request to redirect to /authorize after user creation

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): added new buildPostAuthorizeUrl method to CreateUser custom script (prompt=create)

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): added disablePromptCreate configuration property

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): added test for disablePromptCreate (prompt=create)

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): do not allow to create user if disablePromptCreate=true (prompt=create)

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): use scriptContext instead of execution context during scripts run (prompt=create)

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): prepared CreateUser custom script example (prompt=create)

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): added prompt=create to docs

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

* feat(jans-auth-server): added CreateUser description

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>

---------

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>
Signed-off-by: moabu <47318409+moabu@users.noreply.github.com>
fix: update deprecated sample script JanssenProject#8127

Signed-off-by: jgomer2001 <bonustrack310@gmail.com>
Signed-off-by: Mustafa Baser <mbaser@mail.com>
* fix(jans-cli-tui): add jansCustomPerson to obkectclass for users

Signed-off-by: Mustafa Baser <mbaser@mail.com>

* fix(jans-cli-tui): response code for put-user

Signed-off-by: Mustafa Baser <mbaser@mail.com>

* fix(jans-cli-tui): only active attributes can be added to person

Signed-off-by: Mustafa Baser <mbaser@mail.com>

---------

Signed-off-by: Mustafa Baser <mbaser@mail.com>
…#8133)

Signed-off-by: Arnab Dutta <arnab.bdutta@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
JanssenProject#8145)

feat(fido2): allow to update device data in SG authentication response JanssenProject#8116

Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
Signed-off-by: ossdhaval <343411+ossdhaval@users.noreply.github.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
chore: sync SG script wrt latest updates JanssenProject#8123

Signed-off-by: jgomer2001 <bonustrack310@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
…8156)

docs: add missing command JanssenProject#8155

Signed-off-by: jgomer2001 <bonustrack310@gmail.com>
Signed-off-by: Mustafa Baser <mbaser@mail.com>
Signed-off-by: Amro Misbah <amromisba7@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
…nssenProject#8129)

Signed-off-by: iromli <isman.firmansyah@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
moabu
moabu previously approved these changes Mar 28, 2024
Copy link
Member

@moabu moabu left a comment

Choose a reason for hiding this comment

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

This works and I think can address certain limitation of the TUI atm. This helps if people have ephemeral envs and want to call the internal address of kuberentes services for each service.

@moabu moabu dismissed their stale review November 6, 2024 15:31

The merge-base changed after approval.

@moabu moabu force-pushed the main branch 2 times, most recently from 5126af2 to aa1b2ed Compare December 27, 2024 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-documentation Documentation needs to change as part of issue or PR comp-jans-cli-tui Component affected by issue or PR enhancement priority-3 Issue or PR is relevant to core functions, but does not impede progress. Important, but not urgent triaged Issue or PR is fully triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.