Skip to content

feat(jans-auth-server): openID AuthZEN implementation #10197

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

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

yuriyz
Copy link
Contributor

@yuriyz yuriyz commented Nov 19, 2024

Description

AuthZEN implementation

https://openid.github.io/authzen/#name-the-access-evaluation-api-r

Target issue

closes #9557

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)

Please check the below before submitting your PR. The PR will not be merged if there are no commits that start with docs: to indicate documentation changes or if the below checklist is not selected.

  • I confirm that there is no impact on the docs due to the code changes in this PR.

Closes #10199,

@yuriyz yuriyz enabled auto-merge (squash) November 19, 2024 17:48
Copy link

DryRun Security Summary

The pull request focuses on enhancing the access evaluation functionality of the Jans Authentication Server, including the introduction of a standardized access evaluation endpoint, robust input validation and error handling, expansion of the OpenID Connect discovery process, addition of a custom script type for access evaluation, and comprehensive test coverage.

Expand for full summary

Summary:

The changes in this pull request are focused on enhancing the access evaluation functionality of the Jans Authentication Server. The key improvements include:

  1. Introduction of a standardized access evaluation endpoint that allows clients to check if a user has the necessary permissions to perform a specific action on a resource.
  2. Implementation of robust input validation and error handling mechanisms to ensure that access evaluation requests are properly validated and malformed requests are handled appropriately.
  3. Expansion of the OpenID Connect (OIDC) discovery process to include the new access evaluation endpoint, making it easier for clients to integrate with the authentication server.
  4. Addition of a custom script type for access evaluation, allowing developers to extend the access control logic as needed.
  5. Comprehensive test coverage for the access evaluation functionality, including unit tests for the input validation and error handling components.

From an application security perspective, these changes demonstrate a strong focus on security and reliability. The use of secure communication channels, proper input validation, and robust error handling help mitigate common web application security vulnerabilities. Additionally, the ability to customize the access evaluation logic through external scripts introduces flexibility, but it also requires careful review and validation to ensure the security of the implementation.

Files Changed:

  1. docs/assets/log/access-evaluation-run-log.txt: This file demonstrates the OpenID Connect Discovery process and the implementation of the access evaluation endpoint, highlighting the use of secure communication, authentication, and authorization mechanisms.
  2. docs/janssen-server/auth-server/README.md: The changes update the README to include a reference to the AuthZEN Authorization API 1.0, which is a standard for managing and enforcing authorization policies.
  3. docs/janssen-server/developer/interception-scripts.md: The new "Access Evaluation" script type is introduced, allowing developers to customize the access evaluation process.
  4. docs/janssen-server/auth-server/endpoints/access-evaluation.md: This document describes the implementation of the Access Evaluation Endpoint, which follows the OpenID AuthZEN Authorization API 1.0 specification.
  5. docs/script-catalog/access_evaluation/access-evaluation.md: This file provides an example implementation of the "Access Evaluation" script, demonstrating custom validation and subject-based authorization logic.
  6. jans-auth-server/client/ and jans-auth-server/server/ directories: These directories contain various classes and tests related to the access evaluation functionality, including the AccessEvaluationClient, AccessEvaluationValidator, AccessEvaluationService, and related test cases.

Code Analysis

We ran 9 analyzers against 30 files and 1 analyzer had findings. 8 analyzers had no findings.

Analyzer Findings
Authn/Authz Analyzer 4 findings

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

Copy link

@mo-auto mo-auto added area-documentation Documentation needs to change as part of issue or PR comp-docs Touching folder /docs comp-jans-auth-server Component affected by issue or PR comp-jans-core Component affected by issue or PR comp-jans-linux-setup Component affected by issue or PR kind-feature Issue or PR is a new feature request labels Nov 20, 2024
Copy link

@mo-auto
Copy link
Member

mo-auto commented Nov 20, 2024

Error: Hi @yuriyz, You did not reference an open issue in your PR. I attempted to create an issue for you.
Please update that issues' title and body and make sure I correctly referenced it in the above PRs body.

@moabu moabu disabled auto-merge November 20, 2024 03:32
@moabu moabu merged commit 833c24a into main Nov 20, 2024
13 checks passed
@moabu moabu deleted the jjans-auth-server-9557 branch November 20, 2024 03:33
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-docs Touching folder /docs comp-jans-auth-server Component affected by issue or PR comp-jans-core Component affected by issue or PR comp-jans-linux-setup Component affected by issue or PR kind-feature Issue or PR is a new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: feat(jans-auth-server): openID AuthZEN implementation -autocreated feat(jans-auth-server): OpenID AuthZEN
5 participants