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

Profilegroups #1203

Merged
merged 9 commits into from
Mar 28, 2022
Merged

Profilegroups #1203

merged 9 commits into from
Mar 28, 2022

Conversation

danlester
Copy link
Contributor

Fixes #1191

Changes introduced in this PR:

profiles.jupyterlab in qhub-config.yaml now has an access field - can be all, keycloak, yaml

  • If yaml, also specify groups and/or users fields to restrict access to those users
  • If all everyone will have access
  • If keycloak access is granted to users/groups with the Keycloak attribute jupyterlabprofiles containing the display_name in their lists

Added qhub upgrade mechanism for this.

Group attributes are no longer overwritten on non-initial deploys (previously the pre-existing groups would have attributes reset).

Types of changes

What types of changes does your PR introduce?

Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

Requires testing

  • Yes
  • No

In case you checked yes, did you write tests?

  • Yes
  • No

Documentation

Does your contribution include breaking changes or deprecations?
If so have you updated the documentation?

  • Yes, docstrings
  • Yes, main documentation
  • Yes, deprecation notices

@danlester danlester requested a review from costrouc March 25, 2022 15:57
Copy link
Member

@costrouc costrouc left a comment

Choose a reason for hiding this comment

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

I don't have any issues with how this PR was written. Makes perfect sense and I appreciate the default value of all for the jupyterlab profiles. Also like how you used the oauth client and added the variable for controlling if jupyterlab profiles are exposed to the application. We can add other mappers in the future with this pattern.

My only issue is the name jupyterlabprofiles could we name this something with a delimiter e.g. jupyterlab-profiles or jupyterlab_profiles. The reason is I envision that we will want to use this for other profiles in the future. Like dask. Dask-Gateway can follow this exact same pattern of what you have implemented.

Longer term I would like to think of a way that we could manage profiles outside of the configuration qhub-config.yaml it feels like a bad fit and an area where developers will often want to change and modify.

@@ -290,13 +296,26 @@ class Config:


class JupyterLabProfile(Base):
access: AccessEnum = AccessEnum.all
Copy link
Member

Choose a reason for hiding this comment

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

I agree with the default value to keep this backwards compatible.

Copy link
Member

@costrouc costrouc left a comment

Choose a reason for hiding this comment

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

I don't have any issues with how this PR was written. Makes perfect sense and I appreciate the default value of all for the jupyterlab profiles. Also like how you used the oauth client and added the variable for controlling if jupyterlab profiles are exposed to the application. We can add other mappers in the future with this pattern.

My only issue is the name jupyterlabprofiles could we name this something with a delimiter e.g. jupyterlab-profiles or jupyterlab_profiles. The reason is I envision that we will want to use this for other profiles in the future. Like dask for dask_profiles or dask-profiles. Dask-Gateway can follow this exact same pattern of what you have implemented.

Longer term I would like to think of a way that we could manage profiles outside of the configuration qhub-config.yaml it feels like a bad fit and an area where developers will often want to change and modify.

@costrouc
Copy link
Member

Flaky internet posted twice 🙃

@danlester
Copy link
Contributor Author

Good idea - I have added an underscore.

@danlester danlester merged commit ee5fee7 into main Mar 28, 2022
@danlester danlester deleted the profilegroups branch March 28, 2022 08:18
Adam-D-Lewis added a commit that referenced this pull request Apr 15, 2022
* Mdformat tables (#1186)

* Add mdformat-tables

* Run mdformat on all files

* mdformat only docs folder (restore .github md files)

* Fix some vale, restore README/RELEASE

* [ImgBot] Optimize images (#1187)

/docs/source/images/dev_postman_for_keycloak.png -- 298.79kb -> 270.60kb (9.44%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

* Bump conda-store version to 0.3.14 (#1192)

* Allow terraform init to upgrade providers within version specification (#1194)

* Allow terraform init to upgrade providers within version specification

Closes #1193

* Black formatting

* Adding missing __init__ files (#1196)

* Adding missing __init__ files

Closes #1195

* Explicitely using qhub for package

* Give hint on what to include

* Release 0.3.15 for Conda-Store (#1205)

* Profilegroups (#1203)

* Fix in case groups is None

* access all/keycloak/yaml

* jupyterlabproflies mapper

* Keycloak profiles working

* ignore changes to keycloak group attributes

* qhub upgrade for jupyterlab profiles

* docs for jupyterlabprofiles

* Renamed to jupyterlab_profiles

* Render `.gitignore`, black py files (#1206)

* Render .gitignore

* Render clean .gitignore

* Add unit test

* Upgrade black

* Upgrade black

* black format

* exclude qhub/_version.py from black

* Black what needs blackening

* Fix

* Fix

* Update qhub-dask version (#1224)

* Fix env doc links and add corresponding tests (#1216)

* Fix env doc links and add corresponding tests

* fix broken image link

* fix black formatting

* map(any) -> any (#1213)

* Update release notes - justification for changes in `v0.4.0`  (#1178)

* Update release notes

* Remove ref to cookiecutter

* Update link-checker version

* Fix

* Use lycee link-checker instead

* Remove lycee, update md config.json

* Revert version

* Release notes cleanup

* Rewording

* Add to vocab

* Fix table

* Add explicit warning about release

* Update README.md

Fixed some syntax/grammar issues.

* Minor updates

Co-authored-by: Christopher Ostrouchov <chris.ostrouchov@gmail.com>
Co-authored-by: Shannon <magsol@gmail.com>

* Merge spawner and profile env vars

* Support for pinning the IP address of the load balancer via terraform overrides (#1235)

* Suport adding load balancer annotations and ip via terraform overrides

* add documentation for terraform overrides

* make terraform overrides being able to override any variable

* Bump moment from 2.29.1 to 2.29.2 in /tests_e2e (#1241)

Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.29.1...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update cdsdashboards to 0.6.1, Voila to 0.3.5 (#1240)

* Update cdsdashboards to 0.6.1

* voila v0.3.5

* Bump minimist from 1.2.5 to 1.2.6 in /tests_e2e (#1208)

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* output check fix (#1244)

Co-authored-by: Adam-D-Lewis <>

* Add auth to argo

* add argo_workflows value to qhub init command

* update black version

* update black in setup.cfg

Co-authored-by: Dan Lester <dan@ideonate.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Christopher Ostrouchov <chris.ostrouchov@gmail.com>
Co-authored-by: Amit Kumar <dtu.amit@gmail.com>
Co-authored-by: Shannon <magsol@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam Lewis <23342526+Adam-D-Lewis@users.noreply.github.com>
Co-authored-by: Adam-D-Lewis <>
iameskild added a commit that referenced this pull request May 26, 2022
* initial attempt to add argo-workflows

* add enable/disable argo functionality, comment out juptyerflow resources, add custom options for argo helm chart

* add value.yaml, add ingressroute to expose argo dashboard

* rename helm deployment

* add argo check and only check endpoint that are enabled

* reorder outputs

* add lots of comments for automatic pickup by prometheus and toggling rbac for individual argo workflows components

* cleanup comments, add emissary containerRuntime by default

* first pass at docs

* remove jupyterflow commented out resources

* Add auth to argo  (#1249)

* Mdformat tables (#1186)

* Add mdformat-tables

* Run mdformat on all files

* mdformat only docs folder (restore .github md files)

* Fix some vale, restore README/RELEASE

* [ImgBot] Optimize images (#1187)

/docs/source/images/dev_postman_for_keycloak.png -- 298.79kb -> 270.60kb (9.44%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

* Bump conda-store version to 0.3.14 (#1192)

* Allow terraform init to upgrade providers within version specification (#1194)

* Allow terraform init to upgrade providers within version specification

Closes #1193

* Black formatting

* Adding missing __init__ files (#1196)

* Adding missing __init__ files

Closes #1195

* Explicitely using qhub for package

* Give hint on what to include

* Release 0.3.15 for Conda-Store (#1205)

* Profilegroups (#1203)

* Fix in case groups is None

* access all/keycloak/yaml

* jupyterlabproflies mapper

* Keycloak profiles working

* ignore changes to keycloak group attributes

* qhub upgrade for jupyterlab profiles

* docs for jupyterlabprofiles

* Renamed to jupyterlab_profiles

* Render `.gitignore`, black py files (#1206)

* Render .gitignore

* Render clean .gitignore

* Add unit test

* Upgrade black

* Upgrade black

* black format

* exclude qhub/_version.py from black

* Black what needs blackening

* Fix

* Fix

* Update qhub-dask version (#1224)

* Fix env doc links and add corresponding tests (#1216)

* Fix env doc links and add corresponding tests

* fix broken image link

* fix black formatting

* map(any) -> any (#1213)

* Update release notes - justification for changes in `v0.4.0`  (#1178)

* Update release notes

* Remove ref to cookiecutter

* Update link-checker version

* Fix

* Use lycee link-checker instead

* Remove lycee, update md config.json

* Revert version

* Release notes cleanup

* Rewording

* Add to vocab

* Fix table

* Add explicit warning about release

* Update README.md

Fixed some syntax/grammar issues.

* Minor updates

Co-authored-by: Christopher Ostrouchov <chris.ostrouchov@gmail.com>
Co-authored-by: Shannon <magsol@gmail.com>

* Merge spawner and profile env vars

* Support for pinning the IP address of the load balancer via terraform overrides (#1235)

* Suport adding load balancer annotations and ip via terraform overrides

* add documentation for terraform overrides

* make terraform overrides being able to override any variable

* Bump moment from 2.29.1 to 2.29.2 in /tests_e2e (#1241)

Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.29.1...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update cdsdashboards to 0.6.1, Voila to 0.3.5 (#1240)

* Update cdsdashboards to 0.6.1

* voila v0.3.5

* Bump minimist from 1.2.5 to 1.2.6 in /tests_e2e (#1208)

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* output check fix (#1244)

Co-authored-by: Adam-D-Lewis <>

* Add auth to argo

* add argo_workflows value to qhub init command

* update black version

* update black in setup.cfg

Co-authored-by: Dan Lester <dan@ideonate.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Christopher Ostrouchov <chris.ostrouchov@gmail.com>
Co-authored-by: Amit Kumar <dtu.amit@gmail.com>
Co-authored-by: Shannon <magsol@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam Lewis <23342526+Adam-D-Lewis@users.noreply.github.com>
Co-authored-by: Adam-D-Lewis <>

* remove comments

* Clean up argo auth

* Fix typo, add node-selector

* Fix, add argo to vocab

* fix bug and change argo health endpoint

* add overrides to argo workflows

* add some argo roles stuff

* fix cluster role names

* add overrides

* clean up

* Update readme

Co-authored-by: Adam-D-Lewis <>
Co-authored-by: eskild <42120229+iameskild@users.noreply.github.com>
Co-authored-by: Dan Lester <dan@ideonate.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Christopher Ostrouchov <chris.ostrouchov@gmail.com>
Co-authored-by: Amit Kumar <dtu.amit@gmail.com>
Co-authored-by: Shannon <magsol@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: iameskild <eskild@doublee.io>
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.

[ENH] - Keycloak Group attributes to control JupyterLab profile access
2 participants