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

Security soteria 1.1.payara maintenance #2

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1f4d682
Small cleanups; removing unused imports, formatting and modifiers
arjantijms Dec 14, 2017
114388b
Patched pom, used for only publishing impl jar
arjantijms Dec 22, 2017
174e260
Merge branch 'master' into security-soteria-1.1.payara-maintenance
arjantijms Feb 15, 2018
21cef88
PAYARA-2412 Fixed ArrayIndex exception with null password
arjantijms Feb 15, 2018
7067b4b
PAYARA-2364 Fixed warnings in log
arjantijms Feb 15, 2018
fd38685
Some refactoring
arjantijms Mar 5, 2018
995ac79
PAYARA-2566 Add forgotten EL support for Ldap url attribute
arjantijms Mar 5, 2018
6e0d90b
FISH-171 Support for multi HTTPAuthenticationMechanism
MeroRai Jun 16, 2020
6647922
Release 1.1-b01.payara-p4
MeroRai Jun 16, 2020
dae133d
Updated version on pom-p.xml to p4
MeroRai Jun 16, 2020
2df75ef
Update to SNAPSHOT version
MeroRai Jun 16, 2020
cdc4d4f
Update to SNAPSHOT version
MeroRai Jun 16, 2020
231b7a6
Added support for OpenId Authentication Mechanism and Two Identity St…
MeroRai Jun 18, 2020
580a1d8
Merge pull request #1 from MeroRai/FISH-171
MeroRai Jun 18, 2020
c37920e
Simplify retrieval of per-context authentication mechanism
pdudits Nov 10, 2022
e725f5f
FISH-6598: Remove no longer existing mechanism mappings, clean JASPIC…
pdudits Nov 10, 2022
c4fc9f1
Revive integration tests
pdudits Nov 10, 2022
b563bfd
Use non-snapshot dependency for API
pdudits Nov 11, 2022
25f4c8b
Enable release via release plugin
pdudits Nov 11, 2022
7f4ea20
Update to Jakarta API dependency
pdudits Nov 11, 2022
4e97570
[maven-release-plugin] prepare release 1.1-b01.payara-p5
pdudits Nov 11, 2022
338bba6
[maven-release-plugin] prepare for next development iteration
pdudits Nov 11, 2022
72bd531
Fix test setup
pdudits Nov 11, 2022
5447938
Update Copyright
pdudits Nov 16, 2022
1087e32
Merge pull request #4 from payara/fish-6598
pdudits Nov 16, 2022
b6ab306
Merge pull request #5 from pdudits/fish-6598
pdudits Nov 21, 2022
e8a2da4
FISH-6759 use CdiUtils.getBeanReference for mechanism class
aubi Sep 21, 2023
e937620
upgrade to version 1.1-b01.payara-p6
aubi Sep 25, 2023
ad1075a
Merge pull request #7 from aubi/FISH-6759-search-cdi-manager-via-jndi
aubi Sep 25, 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
6 changes: 3 additions & 3 deletions impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<parent>
<groupId>org.glassfish.soteria</groupId>
<artifactId>parent</artifactId>
<version>1.1-b01-SNAPSHOT</version>
<version>1.1-b01.payara-p6</version>
</parent>

<artifactId>javax.security.enterprise</artifactId>
Expand All @@ -63,8 +63,8 @@

<dependencies>
<dependency>
<groupId>javax.security.enterprise</groupId>
<artifactId>javax.security.enterprise-api</artifactId>
<groupId>jakarta.security.enterprise</groupId>
<artifactId>jakarta.security.enterprise-api</artifactId>
<version>${api_dependency_version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
*
*/
@SuppressWarnings("all")
class AnyAnnotationLiteral extends AnnotationLiteral<Any> implements Any {
public class AnyAnnotationLiteral extends AnnotationLiteral<Any> implements Any {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import java.security.Principal;

import javax.annotation.Priority;
import javax.el.ELProcessor;
import javax.interceptor.AroundInvoke;
import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
Expand Down
20 changes: 10 additions & 10 deletions impl/src/main/java/org/glassfish/soteria/cdi/CdiProducer.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,54 +128,54 @@ public boolean isNullable() {
return false;
}

protected CdiProducer<T> active(boolean active) {
public CdiProducer<T> active(boolean active) {
return this;
}

protected CdiProducer<T> name(String name) {
public CdiProducer<T> name(String name) {
this.name = name;
return this;
}

protected CdiProducer<T> create(Function<CreationalContext<T>, T> create) {
public CdiProducer<T> create(Function<CreationalContext<T>, T> create) {
this.create = create;
return this;
}

protected CdiProducer<T> beanClass(Class<?> beanClass) {
public CdiProducer<T> beanClass(Class<?> beanClass) {
this.beanClass = beanClass;
return this;
}

protected CdiProducer<T> types(Type... types) {
public CdiProducer<T> types(Type... types) {
this.types = asSet(types);
return this;
}

protected CdiProducer<T> beanClassAndType(Class<?> beanClass) {
public CdiProducer<T> beanClassAndType(Class<?> beanClass) {
beanClass(beanClass);
types(beanClass);
return this;
}

protected CdiProducer<T> qualifiers(Annotation... qualifiers) {
public CdiProducer<T> qualifiers(Annotation... qualifiers) {
this.qualifiers = asSet(qualifiers);
return this;
}


protected CdiProducer<T> scope(Class<? extends Annotation> scope) {
public CdiProducer<T> scope(Class<? extends Annotation> scope) {
this.scope = scope;
return this;
}

protected CdiProducer<T> addToId(Object object) {
public CdiProducer<T> addToId(Object object) {
id = id + " " + object.toString();
return this;
}

@SafeVarargs
protected static <T> Set<T> asSet(T... a) {
public static <T> Set<T> asSet(T... a) {
return new HashSet<>(asList(a));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
*
*/
@SuppressWarnings("all")
class DefaultAnnotationLiteral extends AnnotationLiteral<Default> implements Default {
public class DefaultAnnotationLiteral extends AnnotationLiteral<Default> implements Default {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,12 @@

package org.glassfish.soteria.cdi;

import javax.security.enterprise.CallerPrincipal;
import javax.security.enterprise.credential.Credential;
import javax.security.enterprise.identitystore.CredentialValidationResult;
import javax.security.enterprise.identitystore.IdentityStore;
import javax.security.enterprise.identitystore.IdentityStoreHandler;

import static java.util.Comparator.comparing;
import static java.util.stream.Collectors.toList;
import static javax.security.enterprise.identitystore.CredentialValidationResult.INVALID_RESULT;
import static javax.security.enterprise.identitystore.CredentialValidationResult.NOT_VALIDATED_RESULT;
import static javax.security.enterprise.identitystore.CredentialValidationResult.Status.VALID;
import static javax.security.enterprise.identitystore.CredentialValidationResult.Status.INVALID;
import static javax.security.enterprise.identitystore.CredentialValidationResult.Status.VALID;
import static javax.security.enterprise.identitystore.IdentityStore.ValidationType.PROVIDE_GROUPS;
import static javax.security.enterprise.identitystore.IdentityStore.ValidationType.VALIDATE;
import static org.glassfish.soteria.cdi.CdiUtils.getBeanReferencesByType;
Expand All @@ -62,6 +56,11 @@
import java.util.List;
import java.util.Set;

import javax.security.enterprise.credential.Credential;
import javax.security.enterprise.identitystore.CredentialValidationResult;
import javax.security.enterprise.identitystore.IdentityStore;
import javax.security.enterprise.identitystore.IdentityStoreHandler;


/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public String readTimeoutExpression() {

@Override
public String url() {
return url;
return hasDeferredExpressions? evalELExpression(url) : url;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* only if the new code is made subject to such option by the copyright
* holder.
*/

// Portions Copyright [2018] Payara Foundation and/or affiliates
package org.glassfish.soteria.cdi;

import static java.lang.Boolean.TRUE;
Expand Down Expand Up @@ -85,12 +85,14 @@ public class LoginToContinueInterceptor implements Serializable {

private static final long serialVersionUID = 1L;

@Inject
private BeanManager beanManager;
private final BeanManager beanManager;
private final Bean<?> interceptedBean;

@Inject
@Intercepted
private Bean<?> interceptedBean;
public LoginToContinueInterceptor(BeanManager beanManager, @Intercepted Bean<?> interceptedBean) {
this.beanManager = beanManager;
this.interceptedBean = interceptedBean;
}

@AroundInvoke
public Object intercept(InvocationContext invocationContext) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* only if the new code is made subject to such option by the copyright
* holder.
*/

// Portions Copyright [2018] Payara Foundation and/or affiliates
package org.glassfish.soteria.cdi;

import static javax.interceptor.Interceptor.Priority.PLATFORM_BEFORE;
Expand Down Expand Up @@ -84,12 +84,14 @@ public class RememberMeInterceptor implements Serializable {

private static final long serialVersionUID = 1L;

@Inject
private BeanManager beanManager;
private final BeanManager beanManager;
private final Bean<?> interceptedBean;

@Inject
@Intercepted
private Bean<?> interceptedBean;
public RememberMeInterceptor(BeanManager beanManager, @Intercepted Bean<?> interceptedBean) {
this.beanManager = beanManager;
this.interceptedBean = interceptedBean;
}

@AroundInvoke
public Object intercept(InvocationContext invocationContext) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,17 @@

public class IdentityStoreConfigurationException extends IdentityStoreException {

public IdentityStoreConfigurationException(String message, Throwable cause) {
super(message,cause);
}
private static final long serialVersionUID = 1L;

public IdentityStoreConfigurationException(Throwable cause) {
super(cause);
}
public IdentityStoreConfigurationException(String message, Throwable cause) {
super(message, cause);
}

public IdentityStoreConfigurationException(String message) {
super(message);
}
public IdentityStoreConfigurationException(Throwable cause) {
super(cause);
}

public IdentityStoreConfigurationException(String message) {
super(message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,17 @@

public class IdentityStoreException extends RuntimeException {

public IdentityStoreException(String message, Throwable cause) {
super(message,cause);
}
private static final long serialVersionUID = 1L;

public IdentityStoreException(Throwable cause) {
super(cause);
}
public IdentityStoreException(String message, Throwable cause) {
super(message, cause);
}

public IdentityStoreException(String message) {
super(message);
}
public IdentityStoreException(Throwable cause) {
super(cause);
}

public IdentityStoreException(String message) {
super(message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,17 @@

public class IdentityStoreRuntimeException extends IdentityStoreException {

public IdentityStoreRuntimeException(String message, Throwable cause) {
super(message,cause);
}
private static final long serialVersionUID = 1L;

public IdentityStoreRuntimeException(Throwable cause) {
super(cause);
}
public IdentityStoreRuntimeException(String message, Throwable cause) {
super(message, cause);
}

public IdentityStoreRuntimeException(String message) {
super(message);
}
public IdentityStoreRuntimeException(Throwable cause) {
super(cause);
}

public IdentityStoreRuntimeException(String message) {
super(message);
}
}
Loading