Commits on Source (33)
-
Antoine Lambert authored
This fixes python 3.7 support due to poetry, a dependency of isort, that removed support for that Python version in a recent release.
-
Jayesh authored
accepts Keycloak server details and an aiocache cache instance returns a starlette SimpleUser along with permissions
-
Jérémy Bobbio (Lunar) authored
Related to swh/meta#4959
-
Antoine Lambert authored
-
Antoine Lambert authored
Related to swh/meta#4960
-
Antoine Lambert authored
swh-auth is compatible with latest django version so we can safely remove the version restriction. Related to swh/devel/swh-web#4734
-
Jérémy Bobbio (Lunar) authored
GitLab will display the content of the README file when browsing the repository. But in case the file is a symlink, it will display the path pointed by the symlink. There is a 6 year old issue about this: https://gitlab.com/gitlab-org/gitlab/-/issues/15093 We can workaround the issue by having the content at the root of the repository and a symlink to this file in the `docs/` directory. Tested in swh/devel/swh-py-template!27
-
Antoine Lambert authored
Previously the OpenID Connect backend was only allowing to provide a refresh token in authorization header for convenient access token renewal when querying a GraphQL service outside of a browser. When one wants to query a GraphQL service inside a browser, the access tokens are usually created and renewed client-side so also allow to provide an access token in the authorization header. In that case, the backend will simply try to decode it in order to authenticate the user. Related to swh/devel/swh-graphql#4652
-
Antoine Lambert authored
Django uses integer identifiers while keycloak uses UUIDs so add some utility functions to convert back and forth between the two.
-
David Douard authored
It now needs types-click which is indeed a dependency of swh.core[testing].
-
Guillaume Samson authored
-
Franck Bret authored
This is a follow up of D8909. The set-token command prompt the user to fill a token if not provided by args. It checks the token is valid and then write it to configuration file. Related T4590
e4f31567 -
Franck Bret authored
Add configuration file argument to auth command group Use keycloak default configuration and defaults method to load and merge configuration (env > params > user configuration file > default auth configuration > defaultvalues) Add swh auth config command which can generate a token by providing a username (password will be asked by a prompt), or verify a provided token. If the token is valid user can save the authentication configuration with token to authentication configuration file which default to auth.yml
59f3326f -
Franck Bret authored
Store authentication tokens in global configuration file with following structure: keycloak: client_id: swh-web realm_name: SoftwareHeritage server_url: https://auth.softwareheritage.org/auth/ keycloak_tokens: SoftwareHeritage: swh-web: xxxtokenxxx
5fa878e4 -
Franck Bret authored
-
David Douard authored
-
David Douard authored
-
Antoine Lambert authored
-
David Douard authored
-
Antoine Lambert authored
Related to swh/meta#5075.
-
David Douard authored
Keycloak got updated (3.9.1) to replace jose by jwcrypto. Use a <3.9 constraint until we properly fix it to support jwcrypto. Also add the dependency on python-jose since we actually import it directly for now.
-
Antoine Lambert authored
Since the release of pytest 8.1, some pytest options are no longer needed and editable install can be used when running tests using tox.
-
David Douard authored
-
Pierre-Yves David authored
At the end of a auth-config command run, we ask the user if the newly obtained token should be written on disk or discarded. The default is to discard it (which seems a bit weird, but is not the point here). Unlike what we do on write, where a green confirmation message is displayed, we do not display any message when discarding. So a user doing things a bit too fast can imagine that the update went all fine as it just display a wall of green messages. So we add a simple yellow message pointing out that we ultimately did not write the new token. That should fix the problem.
-
It adds some breaking API changes that needed to be handled in swh-auth implementation and changed the package managing JWT from python-jose to jwcrypto which is better maintained.
-
Raphaël Gomès authored
This is better UX.
0535cb5c -
Raphaël Gomès authoreda871379f
-
Raphaël Gomès authored
-
David Douard authored
-
Antoine Lambert authored
-
Antoine Lambert authored
Previously when an OIDC user was logged in but the session expired, an HTTP redirect loop could happen making the django website no longer browsable. Ensure redirection to the session expired page happens only once to fix such issue.
-
Antoine Lambert authored
Latest python-keycloak release updated its typings that trigger new mypy errors for swh-auth.
-
Antoine Lambert authored
Bump development tools: mypy, codespell, isort, ... Move all tools configuration in pyproject.toml. Remove no longer needed mypy overrides.
Showing
- .copier-answers.yml 11 additions, 0 deletions.copier-answers.yml
- .git-blame-ignore-revs 2 additions, 1 deletion.git-blame-ignore-revs
- .gitignore 7 additions, 4 deletions.gitignore
- .pre-commit-config.yaml 28 additions, 15 deletions.pre-commit-config.yaml
- CODE_OF_CONDUCT.md 1 addition, 1 deletionCODE_OF_CONDUCT.md
- MANIFEST.in 0 additions, 6 deletionsMANIFEST.in
- README.rst 33 additions, 1 deletionREADME.rst
- README.rst 33 additions, 1 deletionREADME.rst
- docs/Makefile 1 addition, 1 deletiondocs/Makefile
- docs/README.rst 1 addition, 33 deletionsdocs/README.rst
- docs/README.rst 1 addition, 33 deletionsdocs/README.rst
- mypy.ini 0 additions, 23 deletionsmypy.ini
- pyproject.toml 90 additions, 1 deletionpyproject.toml
- pytest.ini 0 additions, 5 deletionspytest.ini
- requirements-django.txt 1 addition, 1 deletionrequirements-django.txt
- requirements-starlette.txt 3 additions, 0 deletionsrequirements-starlette.txt
- requirements-test.txt 3 additions, 1 deletionrequirements-test.txt
- requirements.txt 1 addition, 1 deletionrequirements.txt
- setup.cfg 0 additions, 8 deletionssetup.cfg
- setup.py 0 additions, 75 deletionssetup.py
.copier-answers.yml
0 → 100644
MANIFEST.in
deleted
100644 → 0
README.rst
deleted
120000 → 0
README.rst
0 → 100644
docs/README.rst
deleted
100644 → 0
docs/README.rst
0 → 120000
mypy.ini
deleted
100644 → 0
pytest.ini
deleted
100644 → 0
requirements-starlette.txt
0 → 100644
... | ... | @@ -2,5 +2,5 @@ |
# should match https://pypi.python.org/pypi names. For the full spec or | ||
# dependency lines, see https://pip.readthedocs.org/en/1.1/requirements.html | ||
click | ||
python-keycloak >= 0.19.0 | ||
python-keycloak >= 5.3.1 | ||
pyyaml |
setup.cfg
deleted
100644 → 0
setup.py
deleted
100755 → 0