![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This project contains a number of classes to perform authentication (AuthN) and authorization (AuthZ) in a FastAPI application.
They can be found in oauth2_lib/fastapi.py. Most notable are:
OIDCAuth
: AuthN implementation that authenticates a user against a OIDC backend. You can subclass and implement def userinfo()
as needed.
Authentication
base class.OIDCUserModel
: model of the data returned by OIDCAuth
. You can subclass this to rename and/or add fields.OPAAuthorization
: AuthZ implementation that authorizes a user's HTTP request against an Open Policy Agent (OPA) instance.
Authorization
base class.GraphQLOPAAuthorization
: AuthZ implementation that authorizes a user's GraphQL query against an Open Policy Agent (OPA) instance.
GraphqlAuthorization
base class.OPAResult
: model of the data returned by OPAAuthorization
and GraphQLOPAAuthorization
.The orchestrator-core documentation has a section on Authentication and Authorization that describes how to use/override these classes.
To install the package from PyPI:
pip install oauth2-lib
Steps to setup a virtual environment.
Create and activate a python3 virtualenv.
Install flit to enable you to develop on this repository:
pip install flit
To install all development dependencies:
flit install --deps develop
All steps combined into 1 command:
python -m venv .venv && source .venv/bin/activate && pip install -U pip && pip install flit && flit install --deps develop
Activate the virtualenv and run the unit tests with:
pytest
This project uses pre-commit to automatically run a number of checks before making a git commit. The same checks will be performed in the CI pipeline so this can save you some time.
First ensure you have pre-commit installed. It is recommended to install it outside the virtualenv. On Linux and Mac, pre-commit is available in most package managers. Alternatively you can install it globally with pipx.
Once pre-commit is installed, go into the project root and enable it:
pre-commit install
This should output pre-commit installed at .git/hooks/pre-commit
. The next time you run git commit
the pre-commit hooks will validate your changes.
Depending on the feature type, run bumpversion (patch|minor|major) to increment the version you are working on. For example to update the increment the patch version use
bumpversion patch
oauth2-lib must support the same python versions as orchestrator-core.
Exceptions to this rule are:
FAQs
This is the SURF Oauth2 module that interfaces with the oauth2 setup.
We found that oauth2-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.