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-fido2): interception scripts issue 1485, swagger updates #4543

Merged
merged 20 commits into from
Apr 26, 2023

Conversation

jmunozherbas
Copy link
Contributor

Prepare


Description

Target issue

#1485
#4432

closes #1485
closes #4432

Implementation Details

Interception script was implemented like in jans-auth-server
customScript name: "fido2_interception"
customScript example: docs/script-catalog/fido2_interception/fido2-interception/Fido2Interception_Script.py

Swagger: include super gluu endpoints, in https://(your-server)/.well-known/fido2-configuration endpoint.


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)

@mo-auto mo-auto added area-documentation Documentation needs to change as part of issue or PR comp-jans-core Component affected by issue or PR comp-jans-fido2 Component affected by issue or PR kind-feature Issue or PR is a new feature request labels Apr 10, 2023
@sonarcloud
Copy link

sonarcloud bot commented Apr 10, 2023

[jans-linux-setup] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Apr 10, 2023

[Jans authentication server parent] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information


import java

class Fido2Interception(Fido2InterceptionType):
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you try this script ? According to CustomScriptType jython will fail to load it.

@@ -103,6 +105,7 @@ public enum CustomScriptType implements AttributeEnum {
UPDATE_TOKEN("update_token", "Update Token", UpdateTokenType.class, CustomScript.class, "UpdateToken", new DummyUpdateTokenType()),
CONFIG_API("config_api_auth", "Config Api Auth", ConfigApiType.class, CustomScript.class,"ConfigApiAuthorization", new DummyConfigApiType()),
MODIFY_SSA_RESPONSE("modify_ssa_response", "Modify SSA Response", ModifySsaResponseType.class, CustomScript.class, "ModifySsaResponse", new DummyModifySsaResponseType()),
FIDO2_INTERCEPTION("fido2_interception", "Intercept Fido2", Fido2InterceptionType.class, CustomScript.class, "ModifySsaResponse", new DummyFido2InterceptionType()),
Copy link
Contributor

Choose a reason for hiding this comment

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

ModifySsaResponse doesn't sound as right name for fido script class name :). Probably copy-paste from previous entry.

@moabu moabu linked an issue Apr 11, 2023 that may be closed by this pull request
Copy link
Contributor

@yurem yurem left a comment

Choose a reason for hiding this comment

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

Instead of passing , httpRequest, httpResponse); from top level methods we can inject them in service which need them:

    @Context
    private HttpServletRequest httpRequest;

    @Context
    private httpResponse;

@sonarcloud
Copy link

sonarcloud bot commented Apr 17, 2023

[jans-cli] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Apr 17, 2023

[jans-config-api-parent] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Apr 17, 2023

[jans-core] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@jmunozherbas jmunozherbas requested a review from yurem April 17, 2023 03:22
@jmunozherbas jmunozherbas changed the title feat(jans-fido2); interception scripts issue 1485, swagger updates feat(jans-fido2): interception scripts issue 1485, swagger updates Apr 21, 2023
@mo-auto mo-auto added comp-jans-cli-tui Component affected by issue or PR comp-jans-config-api Component affected by issue or PR labels Apr 21, 2023
@yurem yurem enabled auto-merge (squash) April 25, 2023 10:54
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 comp-jans-config-api Component affected by issue or PR comp-jans-core Component affected by issue or PR comp-jans-fido2 Component affected by issue or PR kind-feature Issue or PR is a new feature request
Projects
None yet
6 participants