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: Support Super Gluu one step authentication to Fido2 server #3593 #3599

Merged
merged 37 commits into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9bfe2db
feat: Support Super Gluu one step authentication to Fido2 server #3593
yurem Jan 11, 2023
1757d90
feat: add sample request/response for one/two steps
yurem Jan 11, 2023
a91b957
feat: enrollment proxy for Super Gluu
yurem Jan 13, 2023
440fb3a
chore: allow to process Super Gluu auth request
yurem Jan 17, 2023
f177d01
feat: add super gluu authentication flow support
yurem Jan 20, 2023
e07fe82
feat: update to conform Jans
yurem Jan 20, 2023
9a7e26c
feat: update SG script and services to conform Fido2 server
yurem Jan 20, 2023
092aaf8
feat: add fido2 device registration services to jans-auth-server
yurem Jan 20, 2023
5e49be9
feat: full 2 step Super Gluu support
yurem Jan 21, 2023
7c1d641
feat: user filter to search user's devices for specifc domain
yurem Jan 21, 2023
f0e1713
fix: super_gluu_script
maduvena Jan 24, 2023
20512c4
fix: super Gluu script
maduvena Jan 24, 2023
7b9568e
feat: support one_step Super Gluu enrollment
yurem Jan 24, 2023
e44ff17
feat: clean up jans-auth-server static config
yurem Jan 24, 2023
e5ff75e
Revert "fix: super_gluu_script"
yurem Jan 24, 2023
500bdbc
Revert "fix: super Gluu script"
yurem Jan 24, 2023
5477bd1
chore: fix after conflicts
yurem Jan 24, 2023
18cf4ef
chore: fix conflicts
yurem Jan 24, 2023
2f85fea
feat: super Gluu uses applicationId isntead of applicationId domain
yurem Jan 25, 2023
f3ee28a
feat: support Super Gluu one_step authentication
yurem Jan 25, 2023
7c41d96
feat: add separate base DN for one step auth requests
yurem Jan 25, 2023
00e91a7
feat: add super Fluu config option and disable it's API by default
yurem Jan 25, 2023
e9c8632
feat: fixes in two step flow to conform katest API
yurem Jan 25, 2023
cfbedae
feat move generic attributes to base bean
yurem Jan 26, 2023
c89db25
feat: remove unused services
yurem Jan 26, 2023
48bc330
chore: review script
yurem Jan 26, 2023
0780c86
chore: code review
yurem Jan 26, 2023
75fb70a
chore: fix formatting
yurem Jan 26, 2023
bd68067
feat: add missing base fido2 branch
yurem Jan 26, 2023
00b1968
chore: code review
yurem Jan 26, 2023
52b4fdb
chore: review validators
yurem Jan 26, 2023
737d0d6
feat: move Super Gluu adaptors code to separate services
yurem Jan 26, 2023
f0e82f8
chore: optimizations
yurem Jan 26, 2023
9381e0d
chore: remove unused methods
yurem Jan 26, 2023
d9188fe
feat: remove U2F clean up jobs
yurem Jan 27, 2023
2038353
feat: more input parameters validations
yurem Jan 27, 2023
9592c0f
feat: final optimizations and fixes
yurem Jan 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: super_gluu_script
  • Loading branch information
maduvena committed Jan 24, 2023
commit f0e1713681d606b5d4c7a69d780610355546470b
170 changes: 170 additions & 0 deletions jans-fido2/common/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>
<artifactId>jans-fido2-common</artifactId>
<packaging>jar</packaging>
<name>FIDO2 Common</name>

<parent>
<groupId>io.jans</groupId>
<artifactId>jans-fido2-parent</artifactId>
<version>1.0.7-SNAPSHOT</version>
</parent>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
<include>**/services/*</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>

<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
<include>**/services/*</include>
<include>**/*.properties</include>
</includes>
</testResource>
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<failOnError>false</failOnError>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<!-- Jans -->
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-fido2-model</artifactId>
<version>${janssen.version}</version>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-orm-model</artifactId>
<version>${janssen.version}</version>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-core-model</artifactId>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-orm-ldap</artifactId>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-orm-couchbase</artifactId>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-orm-sql</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jans-orm-hybrid</artifactId>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-core-util</artifactId>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-core-service</artifactId>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-core-cache</artifactId>
</dependency>

<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-auth-client</artifactId>
</dependency>

<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-auth-common</artifactId>
</dependency>

<!-- Weld -->
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-impl</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.faces</artifactId>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>

<dependency>
<groupId>jakarta.ejb</groupId>
<artifactId>jakarta.ejb-api</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-cbor</artifactId>
</dependency>



<!-- Quartz -->
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
</dependency>

<!-- Tests -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</dependency>



<!-- RestEasy -->
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
</dependency>

</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
*
* Copyright (c) 2020, Janssen Project
*/

package io.jans.fido2.exception;

import io.jans.fido2.model.error.Fido2RPError;

/**
* Parent class of all FIDO2 RuntimeExceptions
*
*/
public class Fido2RuntimeException extends RuntimeException {

private static final long serialVersionUID = -118563205092295773L;

private final String status;
private final String errorMessage;

public Fido2RuntimeException(String errorMessage) {
super(errorMessage);
this.status = "failed";
this.errorMessage = errorMessage;
}

public Fido2RuntimeException(String errorMessage, Throwable cause) {
super(errorMessage, cause);
this.status = "failed";
this.errorMessage = errorMessage;
}

public Fido2RuntimeException(String status, String errorMessage) {
super(errorMessage);
this.status = status;
this.errorMessage = errorMessage;
}

public Fido2RuntimeException(String status, String errorMessage, Throwable cause) {
super(errorMessage, cause);
this.status = status;
this.errorMessage = errorMessage;
}

public Fido2RPError getFormattedMessage() {
return new Fido2RPError(status, errorMessage);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Janssen Project software is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
*
* Copyright (c) 2020, Janssen Project
*/

package io.jans.fido2.service;

import java.util.Base64;
import java.util.Base64.Decoder;
import java.util.Base64.Encoder;

import jakarta.annotation.PostConstruct;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;

import org.slf4j.Logger;

/**
* Utility methods for base64 encoding / decoding
* @author Yuriy Movchan
* @version May 08, 2020
*/

@ApplicationScoped
public class Base64Service {

@Inject
private Logger log;

private Encoder base64Encoder;
private Decoder base64Decoder;

private Encoder base64UrlEncoder;
private Decoder base64UrlDecoder;

@PostConstruct
public void init() {
this.base64Encoder = Base64.getEncoder().withoutPadding();
this.base64Decoder = Base64.getDecoder();

this.base64UrlEncoder = Base64.getUrlEncoder().withoutPadding();
this.base64UrlDecoder = Base64.getUrlDecoder();
}

public String encodeToString(byte[] src) {
return base64Encoder.encodeToString(src);
}

public byte[] encode(byte[] src) {
return base64Encoder.encode(src);
}

public byte[] decode(byte[] src) {
return base64Decoder.decode(src);
}

public byte[] decode(String src) {
return base64Decoder.decode(src);
}

public String urlEncodeToString(byte[] src) {
return base64UrlEncoder.encodeToString(src);
}

public String urlEncodeToStringWithoutPadding(byte[] src) {
return base64UrlEncoder.withoutPadding().encodeToString(src);
}

public byte[] urlDecode(byte[] src) {
return base64UrlDecoder.decode(src);
}

public byte[] urlDecode(String src) {
return base64UrlDecoder.decode(src);
}
}
Loading