Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a551be65eb | |||
| 5449cca3e7 | |||
| 671cb75c72 | |||
| 81ce86800e | |||
| d5ac3a86bc | |||
| 3dff446d18 | |||
| cc89707b03 | |||
| 812ad9c547 | |||
| 364c153e17 | |||
| 39383ab970 | |||
| 8ef5bcd003 | |||
| 4193b73d47 | |||
| 4ce48297f6 | |||
| 02cc2e9d14 | |||
| 27a76a67ae | |||
| ff6cef0cd2 | |||
| 1a7769be28 | |||
| bdf501fe87 | |||
| 461ccd817d | |||
| 381c556f78 | |||
| 3b276e6c0d | |||
| f2115fbef8 | |||
| 298335a57e | |||
| c6566ee772 | |||
| 7442214225 | |||
| 0123ae0981 | |||
| 11a648d106 | |||
| 536e09756c | |||
| ac15cdbea3 | |||
| ad812aefc4 | |||
| d8769fb183 | |||
| ae997a4f46 | |||
| bbc6273abf | |||
| 475af0d3db | |||
| f8a61e66d1 | |||
| 8830e39073 | |||
| 304cc21523 | |||
| d111029078 |
@@ -14,7 +14,7 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
snapshot-test:
|
snapshot-test:
|
||||||
name: Test Against Snapshots
|
name: Test Against Snapshots
|
||||||
uses: spring-io/spring-security-release-tools/.github/workflows/test.yml@ed473b4dafba053c63a453d2d88a89df3b3e18b3 # v1
|
uses: spring-io/spring-security-release-tools/.github/workflows/test.yml@9ca0acea761aa79d71c78cc462048c49ed5c4230 # v1
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
uses: spring-io/spring-security-release-tools/.github/workflows/build.yml@b92832ecbc7cbe969201e6beafbde0ee400cf095 # v1.0.15
|
uses: spring-io/spring-security-release-tools/.github/workflows/build.yml@3f6cc7ffc137ca160061749d5f34dc30d5f36986 # v1.0.17
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest, windows-latest ]
|
os: [ ubuntu-latest, windows-latest ]
|
||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
deploy-artifacts:
|
deploy-artifacts:
|
||||||
name: Deploy Artifacts
|
name: Deploy Artifacts
|
||||||
needs: [ build ]
|
needs: [ build ]
|
||||||
uses: spring-io/spring-security-release-tools/.github/workflows/deploy-artifacts.yml@b92832ecbc7cbe969201e6beafbde0ee400cf095 # v1.0.15
|
uses: spring-io/spring-security-release-tools/.github/workflows/deploy-artifacts.yml@3f6cc7ffc137ca160061749d5f34dc30d5f36986 # v1.0.17
|
||||||
with:
|
with:
|
||||||
should-deploy-artifacts: ${{ needs.build.outputs.should-deploy-artifacts }}
|
should-deploy-artifacts: ${{ needs.build.outputs.should-deploy-artifacts }}
|
||||||
default-publish-milestones-central: true
|
default-publish-milestones-central: true
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
deploy-schema:
|
deploy-schema:
|
||||||
name: Deploy Schema
|
name: Deploy Schema
|
||||||
needs: [ build ]
|
needs: [ build ]
|
||||||
uses: spring-io/spring-security-release-tools/.github/workflows/deploy-schema.yml@b92832ecbc7cbe969201e6beafbde0ee400cf095 # v1.0.15
|
uses: spring-io/spring-security-release-tools/.github/workflows/deploy-schema.yml@3f6cc7ffc137ca160061749d5f34dc30d5f36986 # v1.0.17
|
||||||
with:
|
with:
|
||||||
should-deploy-schema: ${{ needs.build.outputs.should-deploy-artifacts }}
|
should-deploy-schema: ${{ needs.build.outputs.should-deploy-artifacts }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
@@ -49,6 +49,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Send Notification
|
- name: Send Notification
|
||||||
uses: spring-io/spring-security-release-tools/.github/actions/send-notification@b92832ecbc7cbe969201e6beafbde0ee400cf095 # v1.0.15
|
uses: spring-io/spring-security-release-tools/.github/actions/send-notification@3f6cc7ffc137ca160061749d5f34dc30d5f36986 # v1.0.17
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }}
|
webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }}
|
||||||
|
|||||||
@@ -18,21 +18,21 @@ jobs:
|
|||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Compute Version
|
- name: Compute Version
|
||||||
id: compute-version
|
id: compute-version
|
||||||
uses: spring-io/spring-release-actions/compute-version@a1f321783a0769dd2aea4fad6c2ae2f95a52b885 # 0.0.5
|
uses: spring-io/spring-release-actions/compute-version@1b8671612c3eb3d9b9763e2d7b66f1a80d00ee95 # 0.0.6
|
||||||
- name: Get Today's Release Version
|
- name: Get Today's Release Version
|
||||||
id: todays-release
|
id: todays-release
|
||||||
uses: spring-io/spring-release-actions/get-todays-release-version@a1f321783a0769dd2aea4fad6c2ae2f95a52b885 # 0.0.5
|
uses: spring-io/spring-release-actions/get-todays-release-version@1b8671612c3eb3d9b9763e2d7b66f1a80d00ee95 # 0.0.6
|
||||||
with:
|
with:
|
||||||
snapshot-version: ${{ steps.compute-version.outputs.version }}
|
snapshot-version: ${{ steps.compute-version.outputs.version }}
|
||||||
milestone-repository: ${{ github.repository }}
|
milestone-repository: ${{ github.repository }}
|
||||||
milestone-token: ${{ secrets.GITHUB_TOKEN }}
|
milestone-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Compute Next Version
|
- name: Compute Next Version
|
||||||
id: next-version
|
id: next-version
|
||||||
uses: spring-io/spring-release-actions/compute-next-version@a1f321783a0769dd2aea4fad6c2ae2f95a52b885 # 0.0.5
|
uses: spring-io/spring-release-actions/compute-next-version@1b8671612c3eb3d9b9763e2d7b66f1a80d00ee95 # 0.0.6
|
||||||
with:
|
with:
|
||||||
version: ${{ steps.todays-release.outputs.release-version }}
|
version: ${{ steps.todays-release.outputs.release-version }}
|
||||||
- name: Schedule Next Milestone
|
- name: Schedule Next Milestone
|
||||||
uses: spring-io/spring-release-actions/schedule-milestone@a1f321783a0769dd2aea4fad6c2ae2f95a52b885 # 0.0.5
|
uses: spring-io/spring-release-actions/schedule-milestone@1b8671612c3eb3d9b9763e2d7b66f1a80d00ee95 # 0.0.6
|
||||||
with:
|
with:
|
||||||
version: ${{ steps.next-version.outputs.version }}
|
version: ${{ steps.next-version.outputs.version }}
|
||||||
version-date: ${{ steps.next-version.outputs.version-date }}
|
version-date: ${{ steps.next-version.outputs.version-date }}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
|
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
|
||||||
with:
|
with:
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
|
|||||||
@@ -46,6 +46,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Send Notification
|
- name: Send Notification
|
||||||
uses: spring-io/spring-security-release-tools/.github/actions/send-notification@b92832ecbc7cbe969201e6beafbde0ee400cf095 # v1.0.15
|
uses: spring-io/spring-security-release-tools/.github/actions/send-notification@3f6cc7ffc137ca160061749d5f34dc30d5f36986 # v1.0.17
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }}
|
webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }}
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: Release Announcements - Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: The version to publish
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
contents: read
|
||||||
|
issues: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-schema:
|
||||||
|
name: Deploy Schema
|
||||||
|
uses: spring-io/spring-security-release-tools/.github/workflows/deploy-schema.yml@3f6cc7ffc137ca160061749d5f34dc30d5f36986 # v1.0.17
|
||||||
|
with:
|
||||||
|
should-deploy-schema: true
|
||||||
|
secrets: inherit
|
||||||
|
publish-release-announcements:
|
||||||
|
name: Publish Release Announcements
|
||||||
|
needs: [ deploy-schema ]
|
||||||
|
if: ${{ !github.event.repository.fork }}
|
||||||
|
uses: spring-io/spring-security-release-tools/.github/workflows/release-announcements-publish.yml@3f6cc7ffc137ca160061749d5f34dc30d5f36986 # v1.0.17
|
||||||
|
with:
|
||||||
|
version: ${{ inputs.version }}
|
||||||
|
secrets: inherit
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
name: Release Announcements - Stage
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: The version to stage
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stage-release-announcements:
|
||||||
|
name: Stage Release Announcements
|
||||||
|
if: ${{ !github.event.repository.fork }}
|
||||||
|
uses: spring-io/spring-security-release-tools/.github/workflows/release-announcements-stage.yml@3f6cc7ffc137ca160061749d5f34dc30d5f36986 # v1.0.17
|
||||||
|
with:
|
||||||
|
version: ${{ inputs.version || github.ref_name }}
|
||||||
|
secrets: inherit
|
||||||
+1
-1
@@ -90,7 +90,7 @@ public class ExpressionBasedAnnotationAttributeFactory implements PrePostInvocat
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delay the lookup of the {@link ExpressionParser} to prevent SEC-2136
|
* Delay the lookup of the {@link ExpressionParser} to prevent SEC-2136.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private ExpressionParser getParser() {
|
private ExpressionParser getParser() {
|
||||||
|
|||||||
+3
@@ -30,6 +30,9 @@ import org.springframework.security.access.prepost.PostInvocationAuthorizationAd
|
|||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A {@link PostInvocationAuthorizationAdvice} that applies {@code PostFilter} and
|
||||||
|
* {@code PostAuthorize} expressions.
|
||||||
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @deprecated Use
|
* @deprecated Use
|
||||||
|
|||||||
+2
@@ -23,6 +23,8 @@ import org.springframework.expression.ParseException;
|
|||||||
import org.springframework.security.access.prepost.PostInvocationAttribute;
|
import org.springframework.security.access.prepost.PostInvocationAttribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A {@link PostInvocationAttribute} based on filter and authorize expressions.
|
||||||
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @deprecated Use
|
* @deprecated Use
|
||||||
|
|||||||
+2
@@ -23,6 +23,8 @@ import org.springframework.expression.ParseException;
|
|||||||
import org.springframework.security.access.prepost.PreInvocationAttribute;
|
import org.springframework.security.access.prepost.PreInvocationAttribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A {@link PreInvocationAttribute} based on parsed {@link Expression}s.
|
||||||
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @deprecated Use
|
* @deprecated Use
|
||||||
|
|||||||
+4
-3
@@ -59,12 +59,12 @@ public class MapBasedMethodSecurityMetadataSource extends AbstractFallbackMethod
|
|||||||
private @Nullable ClassLoader beanClassLoader = ClassUtils.getDefaultClassLoader();
|
private @Nullable ClassLoader beanClassLoader = ClassUtils.getDefaultClassLoader();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map from RegisteredMethod to ConfigAttribute list
|
* Map from RegisteredMethod to ConfigAttribute list.
|
||||||
*/
|
*/
|
||||||
protected final Map<RegisteredMethod, List<ConfigAttribute>> methodMap = new HashMap<>();
|
protected final Map<RegisteredMethod, List<ConfigAttribute>> methodMap = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map from RegisteredMethod to name pattern used for registration
|
* Map from RegisteredMethod to name pattern used for registration.
|
||||||
*/
|
*/
|
||||||
private final Map<RegisteredMethod, String> nameMap = new HashMap<>();
|
private final Map<RegisteredMethod, String> nameMap = new HashMap<>();
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ public class MapBasedMethodSecurityMetadataSource extends AbstractFallbackMethod
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the <tt>MapBasedMethodSecurityMetadataSource</tt> from a
|
* Creates the <tt>MapBasedMethodSecurityMetadataSource</tt> from a.
|
||||||
* @param methodMap map of method names to <tt>ConfigAttribute</tt>s.
|
* @param methodMap map of method names to <tt>ConfigAttribute</tt>s.
|
||||||
*/
|
*/
|
||||||
public MapBasedMethodSecurityMetadataSource(Map<String, List<ConfigAttribute>> methodMap) {
|
public MapBasedMethodSecurityMetadataSource(Map<String, List<ConfigAttribute>> methodMap) {
|
||||||
@@ -236,6 +236,7 @@ public class MapBasedMethodSecurityMetadataSource extends AbstractFallbackMethod
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns the size of the method map.
|
||||||
* @return map size (for unit tests and diagnostics)
|
* @return map size (for unit tests and diagnostics)
|
||||||
*/
|
*/
|
||||||
public int getMethodMapSize() {
|
public int getMethodMapSize() {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import org.springframework.security.core.parameters.AnnotationParameterNameDisco
|
|||||||
public @interface P {
|
public @interface P {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The parameter name
|
* The parameter name.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String value();
|
String value();
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ public class PrePostAdviceReactiveMethodInterceptor implements MethodInterceptor
|
|||||||
private static final int RETURN_TYPE_METHOD_PARAMETER_INDEX = -1;
|
private static final int RETURN_TYPE_METHOD_PARAMETER_INDEX = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param attributeSource the {@link MethodSecurityMetadataSource} to use
|
* @param attributeSource the {@link MethodSecurityMetadataSource} to use
|
||||||
* @param preInvocationAdvice the {@link PreInvocationAuthorizationAdvice} to use
|
* @param preInvocationAdvice the {@link PreInvocationAuthorizationAdvice} to use
|
||||||
* @param postInvocationAdvice the {@link PostInvocationAuthorizationAdvice} to use
|
* @param postInvocationAdvice the {@link PostInvocationAuthorizationAdvice} to use
|
||||||
|
|||||||
+3
@@ -22,6 +22,9 @@ import org.springframework.aop.framework.AopInfrastructureBean;
|
|||||||
import org.springframework.security.authorization.AuthorizationManager;
|
import org.springframework.security.authorization.AuthorizationManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A factory for creating {@link PreInvocationAttribute}s and
|
||||||
|
* {@link PostInvocationAttribute}s.
|
||||||
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @see org.springframework.security.authorization.method.AuthorizationManagerBeforeMethodInterceptor
|
* @see org.springframework.security.authorization.method.AuthorizationManagerBeforeMethodInterceptor
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ package org.springframework.security.messaging.access.expression;
|
|||||||
import org.springframework.expression.EvaluationContext;
|
import org.springframework.expression.EvaluationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows post processing the {@link EvaluationContext}
|
* Allows post processing the {@link EvaluationContext}.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* This API is intentionally kept package scope as it may evolve over time.
|
* This API is intentionally kept package scope as it may evolve over time.
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ class MessageExpressionConfigAttribute implements ConfigAttribute, EvaluationCon
|
|||||||
private final MessageMatcher<Object> matcher;
|
private final MessageMatcher<Object> matcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param authorizeExpression the {@link Expression} to use. Cannot be null
|
* @param authorizeExpression the {@link Expression} to use. Cannot be null
|
||||||
* @param matcher the {@link MessageMatcher} used to match the messages.
|
* @param matcher the {@link MessageMatcher} used to match the messages.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -48,7 +48,7 @@ public final class ChannelSecurityInterceptor extends AbstractSecurityIntercepto
|
|||||||
private final MessageSecurityMetadataSource metadataSource;
|
private final MessageSecurityMetadataSource metadataSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param metadataSource the MessageSecurityMetadataSource to use. Cannot be null.
|
* @param metadataSource the MessageSecurityMetadataSource to use. Cannot be null.
|
||||||
*
|
*
|
||||||
* @see DefaultMessageSecurityMetadataSource
|
* @see DefaultMessageSecurityMetadataSource
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ import org.springframework.messaging.Message;
|
|||||||
import org.springframework.security.access.SecurityMetadataSource;
|
import org.springframework.security.access.SecurityMetadataSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link SecurityMetadataSource} that is used for securing {@link Message}
|
* A {@link SecurityMetadataSource} that is used for securing {@link Message}.
|
||||||
*
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
|
|||||||
+4
-2
@@ -32,6 +32,8 @@ import org.springframework.security.web.RedirectStrategy;
|
|||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A {@link ChannelEntryPoint} that retries the request on a different scheme and port.
|
||||||
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
* @deprecated please use
|
* @deprecated please use
|
||||||
* {@link org.springframework.security.web.transport.HttpsRedirectFilter} and its
|
* {@link org.springframework.security.web.transport.HttpsRedirectFilter} and its
|
||||||
@@ -45,12 +47,12 @@ public abstract class AbstractRetryEntryPoint implements ChannelEntryPoint {
|
|||||||
private PortMapper portMapper = new PortMapperImpl();
|
private PortMapper portMapper = new PortMapperImpl();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The scheme ("http://" or "https://")
|
* The scheme ("http://" or "https://").
|
||||||
*/
|
*/
|
||||||
private final String scheme;
|
private final String scheme;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The standard port for the scheme (80 for http, 443 for https)
|
* The standard port for the scheme (80 for http, 443 for https).
|
||||||
*/
|
*/
|
||||||
private final int standardPort;
|
private final int standardPort;
|
||||||
|
|
||||||
|
|||||||
+2
@@ -28,6 +28,8 @@ import org.springframework.security.core.Authentication;
|
|||||||
import org.springframework.security.web.FilterInvocation;
|
import org.springframework.security.web.FilterInvocation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* The default implementation of {@link SecurityExpressionHandler} for web security.
|
||||||
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
* @author Eddú Meléndez
|
* @author Eddú Meléndez
|
||||||
* @author Steve Riesenberg
|
* @author Steve Riesenberg
|
||||||
|
|||||||
+2
-2
@@ -54,7 +54,7 @@ public class FilterSecurityInterceptor extends AbstractSecurityInterceptor imple
|
|||||||
private boolean observeOncePerRequest = false;
|
private boolean observeOncePerRequest = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not used (we rely on IoC container lifecycle services instead)
|
* Not used (we rely on IoC container lifecycle services instead).
|
||||||
* @param arg0 ignored
|
* @param arg0 ignored
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -63,7 +63,7 @@ public class FilterSecurityInterceptor extends AbstractSecurityInterceptor imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not used (we rely on IoC container lifecycle services instead)
|
* Not used (we rely on IoC container lifecycle services instead).
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public class BasicLookupStrategy implements LookupStrategy {
|
|||||||
private AclClassIdUtils aclClassIdUtils;
|
private AclClassIdUtils aclClassIdUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor accepting mandatory arguments
|
* Constructor accepting mandatory arguments.
|
||||||
* @param dataSource to access the database
|
* @param dataSource to access the database
|
||||||
* @param aclCache the cache where fully-loaded elements can be stored
|
* @param aclCache the cache where fully-loaded elements can be stored
|
||||||
* @param aclAuthorizationStrategy authorization strategy (required)
|
* @param aclAuthorizationStrategy authorization strategy (required)
|
||||||
@@ -150,7 +150,7 @@ public class BasicLookupStrategy implements LookupStrategy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param dataSource to access the database
|
* @param dataSource to access the database
|
||||||
* @param aclCache the cache where fully-loaded elements can be stored
|
* @param aclCache the cache where fully-loaded elements can be stored
|
||||||
* @param aclAuthorizationStrategy authorization strategy (required)
|
* @param aclAuthorizationStrategy authorization strategy (required)
|
||||||
@@ -560,7 +560,7 @@ public class BasicLookupStrategy implements LookupStrategy {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Accepts the current <code>ResultSet</code> row, and converts it into an
|
* Accepts the current <code>ResultSet</code> row, and converts it into an
|
||||||
* <code>AclImpl</code> that contains a <code>StubAclParent</code>
|
* <code>AclImpl</code> that contains a <code>StubAclParent</code>.
|
||||||
* @param acls the Map we should add the converted Acl to
|
* @param acls the Map we should add the converted Acl to
|
||||||
* @param rs the ResultSet focused on a current row
|
* @param rs the ResultSet focused on a current row
|
||||||
* @throws SQLException if something goes wrong converting values
|
* @throws SQLException if something goes wrong converting values
|
||||||
|
|||||||
@@ -454,6 +454,7 @@ public class JdbcMutableAclService extends JdbcAclService implements MutableAclS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Sets whether the database enforces foreign key constraints.
|
||||||
* @param foreignKeysInDatabase if false this class will perform additional FK
|
* @param foreignKeysInDatabase if false this class will perform additional FK
|
||||||
* constrain checking, which may cause deadlocks (the default is true, so deadlocks
|
* constrain checking, which may cause deadlocks (the default is true, so deadlocks
|
||||||
* are avoided but the database is expected to enforce FKs)
|
* are avoided but the database is expected to enforce FKs)
|
||||||
|
|||||||
@@ -15,6 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JDBC-based persistence of ACL information
|
* JDBC-based persistence of ACL information.
|
||||||
*/
|
*/
|
||||||
package org.springframework.security.acls.jdbc;
|
package org.springframework.security.acls.jdbc;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import java.io.Serializable;
|
|||||||
public interface ObjectIdentity extends Serializable {
|
public interface ObjectIdentity extends Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Compares this <tt>ObjectIdentity</tt> to the given object for equality.
|
||||||
* @param obj to be compared
|
* @param obj to be compared
|
||||||
* @return <tt>true</tt> if the objects are equal, <tt>false</tt> otherwise
|
* @return <tt>true</tt> if the objects are equal, <tt>false</tt> otherwise
|
||||||
* @see Object#equals(Object)
|
* @see Object#equals(Object)
|
||||||
@@ -65,6 +66,7 @@ public interface ObjectIdentity extends Serializable {
|
|||||||
String getType();
|
String getType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns a hash code representation of the <tt>ObjectIdentity</tt>.
|
||||||
* @return a hash code representation of the <tt>ObjectIdentity</tt>
|
* @return a hash code representation of the <tt>ObjectIdentity</tt>
|
||||||
* @see Object#hashCode()
|
* @see Object#hashCode()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ import java.io.Serializable;
|
|||||||
public interface ObjectIdentityGenerator {
|
public interface ObjectIdentityGenerator {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Creates an {@link ObjectIdentity} using the supplied identifier and type
|
||||||
|
* information.
|
||||||
* @param id the identifier of the domain object, not null
|
* @param id the identifier of the domain object, not null
|
||||||
* @param type the type of the object (often a class name), not null
|
* @param type the type of the object (often a class name), not null
|
||||||
* @return the identity constructed using the supplied identifier and type
|
* @return the identity constructed using the supplied identifier and type
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ package org.springframework.security.acls.model;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Strategy interface that provides the ability to determine which {@link ObjectIdentity}
|
* Strategy interface that provides the ability to determine which {@link ObjectIdentity}
|
||||||
* will be returned for a particular domain object
|
* will be returned for a particular domain object.
|
||||||
*
|
*
|
||||||
* @author Ben Alex
|
* @author Ben Alex
|
||||||
*/
|
*/
|
||||||
|
|||||||
+5
-5
@@ -72,7 +72,7 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private constructor for Jackson Deserialization support
|
* Private constructor for Jackson Deserialization support.
|
||||||
* @param keyHash hashCode of provided key to identify if this object made by a given
|
* @param keyHash hashCode of provided key to identify if this object made by a given
|
||||||
* {@link CasAuthenticationProvider}
|
* {@link CasAuthenticationProvider}
|
||||||
* @param principal typically the UserDetails object (cannot be <code>null</code>)
|
* @param principal typically the UserDetails object (cannot be <code>null</code>)
|
||||||
@@ -182,7 +182,7 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A builder of {@link CasAuthenticationToken} instances
|
* A builder of {@link CasAuthenticationToken} instances.
|
||||||
*
|
*
|
||||||
* @since 7.0
|
* @since 7.0
|
||||||
*/
|
*/
|
||||||
@@ -208,7 +208,7 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this key
|
* Use this key.
|
||||||
* @param key the key to use
|
* @param key the key to use
|
||||||
* @return the {@link Builder} for further configurations
|
* @return the {@link Builder} for further configurations
|
||||||
*/
|
*/
|
||||||
@@ -232,7 +232,7 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this {@link UserDetails}
|
* Use this {@link UserDetails}.
|
||||||
* @param userDetails the {@link UserDetails} to use
|
* @param userDetails the {@link UserDetails} to use
|
||||||
* @return the {@link Builder} for further configurations
|
* @return the {@link Builder} for further configurations
|
||||||
*/
|
*/
|
||||||
@@ -242,7 +242,7 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this {@link Assertion}
|
* Use this {@link Assertion}.
|
||||||
* @param assertion the {@link Assertion} to use
|
* @param assertion the {@link Assertion} to use
|
||||||
* @return the {@link Builder} for further configurations
|
* @return the {@link Builder} for further configurations
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -121,7 +121,7 @@ public class CasServiceTicketAuthenticationToken extends AbstractAuthenticationT
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A builder of {@link CasServiceTicketAuthenticationToken} instances
|
* A builder of {@link CasServiceTicketAuthenticationToken} instances.
|
||||||
*
|
*
|
||||||
* @since 7.0
|
* @since 7.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -32,6 +32,7 @@ import org.jspecify.annotations.Nullable;
|
|||||||
public final class NullStatelessTicketCache implements StatelessTicketCache {
|
public final class NullStatelessTicketCache implements StatelessTicketCache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Always returns {@code null} since tickets are not stored.
|
||||||
* @return null since we are not storing any tickets.
|
* @return null since we are not storing any tickets.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -20,9 +20,11 @@ import java.util.Date;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
|
||||||
import org.apereo.cas.client.authentication.AttributePrincipal;
|
import org.apereo.cas.client.authentication.AttributePrincipal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,14 +38,14 @@ import org.apereo.cas.client.authentication.AttributePrincipal;
|
|||||||
* @see CasJacksonModule
|
* @see CasJacksonModule
|
||||||
* @see org.springframework.security.jackson.SecurityJacksonModules
|
* @see org.springframework.security.jackson.SecurityJacksonModules
|
||||||
*/
|
*/
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
|
@JsonTypeInfo(use = Id.CLASS)
|
||||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE,
|
||||||
isGetterVisibility = JsonAutoDetect.Visibility.NONE)
|
isGetterVisibility = Visibility.NONE)
|
||||||
class AssertionImplMixin {
|
class AssertionImplMixin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mixin Constructor helps in deserialize
|
* Mixin Constructor helps in deserialize
|
||||||
* {@link org.apereo.cas.client.validation.AssertionImpl}
|
* {@link org.apereo.cas.client.validation.AssertionImpl}.
|
||||||
* @param principal the Principal to associate with the Assertion.
|
* @param principal the Principal to associate with the Assertion.
|
||||||
* @param validFromDate when the assertion is valid from.
|
* @param validFromDate when the assertion is valid from.
|
||||||
* @param validUntilDate when the assertion is valid to.
|
* @param validUntilDate when the assertion is valid to.
|
||||||
|
|||||||
+6
-4
@@ -19,9 +19,11 @@ package org.springframework.security.cas.jackson;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
|
||||||
import org.apereo.cas.client.proxy.ProxyRetriever;
|
import org.apereo.cas.client.proxy.ProxyRetriever;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,14 +37,14 @@ import org.apereo.cas.client.proxy.ProxyRetriever;
|
|||||||
* @see CasJacksonModule
|
* @see CasJacksonModule
|
||||||
* @see org.springframework.security.jackson.SecurityJacksonModules
|
* @see org.springframework.security.jackson.SecurityJacksonModules
|
||||||
*/
|
*/
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
|
@JsonTypeInfo(use = Id.CLASS)
|
||||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE,
|
||||||
isGetterVisibility = JsonAutoDetect.Visibility.NONE)
|
isGetterVisibility = Visibility.NONE)
|
||||||
class AttributePrincipalImplMixin {
|
class AttributePrincipalImplMixin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mixin Constructor helps in deserialize
|
* Mixin Constructor helps in deserialize
|
||||||
* {@link org.apereo.cas.client.authentication.AttributePrincipalImpl}
|
* {@link org.apereo.cas.client.authentication.AttributePrincipalImpl}.
|
||||||
* @param name the unique identifier for the principal.
|
* @param name the unique identifier for the principal.
|
||||||
* @param attributes the key/value pairs for this principal.
|
* @param attributes the key/value pairs for this principal.
|
||||||
* @param proxyGrantingTicket the ticket associated with this principal.
|
* @param proxyGrantingTicket the ticket associated with this principal.
|
||||||
|
|||||||
+6
-4
@@ -19,9 +19,11 @@ package org.springframework.security.cas.jackson;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
|
||||||
import org.apereo.cas.client.validation.Assertion;
|
import org.apereo.cas.client.validation.Assertion;
|
||||||
|
|
||||||
import org.springframework.security.cas.authentication.CasAuthenticationProvider;
|
import org.springframework.security.cas.authentication.CasAuthenticationProvider;
|
||||||
@@ -38,13 +40,13 @@ import org.springframework.security.core.userdetails.UserDetails;
|
|||||||
* @see CasJacksonModule
|
* @see CasJacksonModule
|
||||||
* @see org.springframework.security.jackson.SecurityJacksonModules
|
* @see org.springframework.security.jackson.SecurityJacksonModules
|
||||||
*/
|
*/
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
|
@JsonTypeInfo(use = Id.CLASS)
|
||||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, isGetterVisibility = JsonAutoDetect.Visibility.NONE,
|
@JsonAutoDetect(fieldVisibility = Visibility.ANY, isGetterVisibility = Visibility.NONE,
|
||||||
getterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.ANY)
|
getterVisibility = Visibility.NONE, creatorVisibility = Visibility.ANY)
|
||||||
class CasAuthenticationTokenMixin {
|
class CasAuthenticationTokenMixin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mixin Constructor helps in deserialize {@link CasAuthenticationToken}
|
* Mixin Constructor helps in deserialize {@link CasAuthenticationToken}.
|
||||||
* @param keyHash hashCode of provided key to identify if this object made by a given
|
* @param keyHash hashCode of provided key to identify if this object made by a given
|
||||||
* {@link CasAuthenticationProvider}
|
* {@link CasAuthenticationProvider}
|
||||||
* @param principal typically the UserDetails object (cannot be <code>null</code>)
|
* @param principal typically the UserDetails object (cannot be <code>null</code>)
|
||||||
|
|||||||
@@ -20,10 +20,13 @@ import java.util.Date;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
|
||||||
import org.apereo.cas.client.authentication.AttributePrincipal;
|
import org.apereo.cas.client.authentication.AttributePrincipal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,15 +52,15 @@ import org.apereo.cas.client.authentication.AttributePrincipal;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("removal")
|
@SuppressWarnings("removal")
|
||||||
@Deprecated(forRemoval = true)
|
@Deprecated(forRemoval = true)
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
|
@JsonTypeInfo(use = Id.CLASS, include = As.PROPERTY)
|
||||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE,
|
||||||
isGetterVisibility = JsonAutoDetect.Visibility.NONE)
|
isGetterVisibility = Visibility.NONE)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
class AssertionImplMixin {
|
class AssertionImplMixin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mixin Constructor helps in deserialize
|
* Mixin Constructor helps in deserialize
|
||||||
* {@link org.apereo.cas.client.validation.AssertionImpl}
|
* {@link org.apereo.cas.client.validation.AssertionImpl}.
|
||||||
* @param principal the Principal to associate with the Assertion.
|
* @param principal the Principal to associate with the Assertion.
|
||||||
* @param validFromDate when the assertion is valid from.
|
* @param validFromDate when the assertion is valid from.
|
||||||
* @param validUntilDate when the assertion is valid to.
|
* @param validUntilDate when the assertion is valid to.
|
||||||
|
|||||||
+7
-4
@@ -19,10 +19,13 @@ package org.springframework.security.cas.jackson2;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
|
||||||
import org.apereo.cas.client.proxy.ProxyRetriever;
|
import org.apereo.cas.client.proxy.ProxyRetriever;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,15 +50,15 @@ import org.apereo.cas.client.proxy.ProxyRetriever;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("removal")
|
@SuppressWarnings("removal")
|
||||||
@Deprecated(forRemoval = true)
|
@Deprecated(forRemoval = true)
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
|
@JsonTypeInfo(use = Id.CLASS, include = As.PROPERTY)
|
||||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE,
|
||||||
isGetterVisibility = JsonAutoDetect.Visibility.NONE)
|
isGetterVisibility = Visibility.NONE)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
class AttributePrincipalImplMixin {
|
class AttributePrincipalImplMixin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mixin Constructor helps in deserialize
|
* Mixin Constructor helps in deserialize
|
||||||
* {@link org.apereo.cas.client.authentication.AttributePrincipalImpl}
|
* {@link org.apereo.cas.client.authentication.AttributePrincipalImpl}.
|
||||||
* @param name the unique identifier for the principal.
|
* @param name the unique identifier for the principal.
|
||||||
* @param attributes the key/value pairs for this principal.
|
* @param attributes the key/value pairs for this principal.
|
||||||
* @param proxyGrantingTicket the ticket associated with this principal.
|
* @param proxyGrantingTicket the ticket associated with this principal.
|
||||||
|
|||||||
+7
-4
@@ -19,10 +19,13 @@ package org.springframework.security.cas.jackson2;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
|
||||||
import org.apereo.cas.client.validation.Assertion;
|
import org.apereo.cas.client.validation.Assertion;
|
||||||
|
|
||||||
import org.springframework.security.cas.authentication.CasAuthenticationProvider;
|
import org.springframework.security.cas.authentication.CasAuthenticationProvider;
|
||||||
@@ -55,14 +58,14 @@ import org.springframework.security.core.userdetails.UserDetails;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("removal")
|
@SuppressWarnings("removal")
|
||||||
@Deprecated(forRemoval = true)
|
@Deprecated(forRemoval = true)
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
|
@JsonTypeInfo(use = Id.CLASS, include = As.PROPERTY)
|
||||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, isGetterVisibility = JsonAutoDetect.Visibility.NONE,
|
@JsonAutoDetect(fieldVisibility = Visibility.ANY, isGetterVisibility = Visibility.NONE,
|
||||||
getterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.ANY)
|
getterVisibility = Visibility.NONE, creatorVisibility = Visibility.ANY)
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
class CasAuthenticationTokenMixin {
|
class CasAuthenticationTokenMixin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mixin Constructor helps in deserialize {@link CasAuthenticationToken}
|
* Mixin Constructor helps in deserialize {@link CasAuthenticationToken}.
|
||||||
* @param keyHash hashCode of provided key to identify if this object made by a given
|
* @param keyHash hashCode of provided key to identify if this object made by a given
|
||||||
* {@link CasAuthenticationProvider}
|
* {@link CasAuthenticationProvider}
|
||||||
* @param principal typically the UserDetails object (cannot be <code>null</code>)
|
* @param principal typically the UserDetails object (cannot be <code>null</code>)
|
||||||
|
|||||||
+1
-1
@@ -154,7 +154,7 @@ public class CasAuthenticationEntryPoint implements AuthenticationEntryPoint, In
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@link RedirectStrategy} to use
|
* Sets the {@link RedirectStrategy} to use.
|
||||||
* @param redirectStrategy the {@link RedirectStrategy} to use
|
* @param redirectStrategy the {@link RedirectStrategy} to use
|
||||||
* @since 6.3
|
* @since 6.3
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -69,7 +69,7 @@ public final class CasGatewayAuthenticationRedirectFilter extends GenericFilterB
|
|||||||
private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
|
private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new instance of this class
|
* Constructs a new instance of this class.
|
||||||
* @param serviceProperties the {@link ServiceProperties}
|
* @param serviceProperties the {@link ServiceProperties}
|
||||||
*/
|
*/
|
||||||
public CasGatewayAuthenticationRedirectFilter(String casLoginUrl, ServiceProperties serviceProperties) {
|
public CasGatewayAuthenticationRedirectFilter(String casLoginUrl, ServiceProperties serviceProperties) {
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ final class DefaultServiceAuthenticationDetails extends WebAuthenticationDetails
|
|||||||
private final String serviceUrl;
|
private final String serviceUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param request the current {@link HttpServletRequest} to obtain the
|
* @param request the current {@link HttpServletRequest} to obtain the
|
||||||
* {@link #getServiceUrl()} from.
|
* {@link #getServiceUrl()} from.
|
||||||
* @param artifactPattern the {@link Pattern} that will be used to clean up the query
|
* @param artifactPattern the {@link Pattern} that will be used to clean up the query
|
||||||
|
|||||||
+2
-1
@@ -53,7 +53,7 @@ public class ServiceAuthenticationDetailsSource
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an implementation that uses the specified artifactParameterName
|
* Creates an implementation that uses the specified artifactParameterName.
|
||||||
* @param serviceProperties The ServiceProperties to use to construct the serviceUrl.
|
* @param serviceProperties The ServiceProperties to use to construct the serviceUrl.
|
||||||
* @param artifactParameterName the artifactParameterName that is removed from the
|
* @param artifactParameterName the artifactParameterName that is removed from the
|
||||||
* current URL. The result becomes the service url. Cannot be null and cannot be an
|
* current URL. The result becomes the service url. Cannot be null and cannot be an
|
||||||
@@ -66,6 +66,7 @@ public class ServiceAuthenticationDetailsSource
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Builds the {@code ServiceAuthenticationDetails} from the given request.
|
||||||
* @param context the {@code HttpServletRequest} object.
|
* @param context the {@code HttpServletRequest} object.
|
||||||
* @return the {@code ServiceAuthenticationDetails} containing information about the
|
* @return the {@code ServiceAuthenticationDetails} containing information about the
|
||||||
* current request
|
* current request
|
||||||
|
|||||||
+2
@@ -25,6 +25,8 @@ import org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator;
|
|||||||
import org.springframework.security.ldap.userdetails.PersonContextMapper;
|
import org.springframework.security.ldap.userdetails.PersonContextMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Test configurations for namespace-based LDAP {@code AuthenticationProvider} setup.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
@@ -50,6 +50,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Integration tests for anonymous authentication over RSocket.
|
||||||
|
*
|
||||||
* @author Andrey Litvitski
|
* @author Andrey Litvitski
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
|
|||||||
+2
@@ -50,6 +50,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Integration tests for securing RSocket requests and responses.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
|
|||||||
+2
@@ -60,6 +60,8 @@ import static org.mockito.Mockito.times;
|
|||||||
import static org.mockito.Mockito.verify;
|
import static org.mockito.Mockito.verify;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Integration tests for RSocket security observations.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
|
|||||||
+2
@@ -50,6 +50,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Integration tests for RSocket security combined with WebFlux security.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
|
|||||||
+2
@@ -59,6 +59,8 @@ import static org.mockito.BDDMockito.given;
|
|||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Integration tests for RSocket JWT authentication.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
|
|||||||
+2
@@ -53,6 +53,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Integration tests for connecting to an {@link RSocketMessageHandler} secured server.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @author Luis Felipe Vega
|
* @author Luis Felipe Vega
|
||||||
* @author Jesús Ascama Arias
|
* @author Jesús Ascama Arias
|
||||||
|
|||||||
+2
@@ -55,6 +55,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Integration tests for securing an {@link RSocketMessageHandler}.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
|
|||||||
+2
@@ -55,6 +55,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Integration tests for securing RSocket requests using simple authentication metadata.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
|
|||||||
+2
@@ -32,6 +32,8 @@ import org.springframework.test.util.ReflectionTestUtils;
|
|||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Tests for the {@code ldap-server} XML namespace element.
|
||||||
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
@@ -39,6 +39,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Tests for the {@code ldap-user-service} bean definition parser.
|
||||||
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @author Eddú Meléndez
|
* @author Eddú Meléndez
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public abstract class BeanIds {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The "global" AuthenticationManager instance, registered by the
|
* The "global" AuthenticationManager instance, registered by the
|
||||||
* <authentication-manager> element
|
* <authentication-manager> element.
|
||||||
*/
|
*/
|
||||||
public static final String AUTHENTICATION_MANAGER = PREFIX + "authenticationManager";
|
public static final String AUTHENTICATION_MANAGER = PREFIX + "authenticationManager";
|
||||||
|
|
||||||
|
|||||||
+3
@@ -25,6 +25,9 @@ import org.springframework.beans.factory.xml.ParserContext;
|
|||||||
import org.springframework.security.config.debug.SecurityDebugBeanFactoryPostProcessor;
|
import org.springframework.security.config.debug.SecurityDebugBeanFactoryPostProcessor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Parses the {@code debug} element to register a
|
||||||
|
* {@link SecurityDebugBeanFactoryPostProcessor}.
|
||||||
|
*
|
||||||
* @author Luke Taylor
|
* @author Luke Taylor
|
||||||
*/
|
*/
|
||||||
public class DebugBeanDefinitionParser implements BeanDefinitionParser {
|
public class DebugBeanDefinitionParser implements BeanDefinitionParser {
|
||||||
|
|||||||
+5
-5
@@ -187,7 +187,7 @@ public abstract class AbstractConfiguredSecurityBuilder<O, B extends SecurityBui
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the shared objects
|
* Gets the shared objects.
|
||||||
* @return the shared Objects
|
* @return the shared Objects
|
||||||
*/
|
*/
|
||||||
public Map<Class<?>, Object> getSharedObjects() {
|
public Map<Class<?>, Object> getSharedObjects() {
|
||||||
@@ -315,7 +315,7 @@ public abstract class AbstractConfiguredSecurityBuilder<O, B extends SecurityBui
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the build using the {@link SecurityConfigurer}'s that have been applied
|
* Executes the build using the {@link SecurityConfigurer}'s that have been applied
|
||||||
* using the following steps:
|
* using the following steps:.
|
||||||
*
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Invokes {@link #beforeInit()} for any subclass to hook into</li>
|
* <li>Invokes {@link #beforeInit()} for any subclass to hook into</li>
|
||||||
@@ -406,7 +406,7 @@ public abstract class AbstractConfiguredSecurityBuilder<O, B extends SecurityBui
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The build state for the application
|
* The build state for the application.
|
||||||
*
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @since 3.2
|
* @since 3.2
|
||||||
@@ -414,7 +414,7 @@ public abstract class AbstractConfiguredSecurityBuilder<O, B extends SecurityBui
|
|||||||
private enum BuildState {
|
private enum BuildState {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the state before the {@link SecurityBuilder#build()} is invoked
|
* This is the state before the {@link SecurityBuilder#build()} is invoked.
|
||||||
*/
|
*/
|
||||||
UNBUILT(0),
|
UNBUILT(0),
|
||||||
|
|
||||||
@@ -455,7 +455,7 @@ public abstract class AbstractConfiguredSecurityBuilder<O, B extends SecurityBui
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if the state is CONFIGURING or later
|
* Determines if the state is CONFIGURING or later.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isConfigured() {
|
public boolean isConfigured() {
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
package org.springframework.security.config.annotation;
|
package org.springframework.security.config.annotation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for building an Object
|
* Interface for building an Object.
|
||||||
*
|
*
|
||||||
* @param <O> The type of the Object being built
|
* @param <O> The type of the Object being built
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
|
|||||||
+1
-1
@@ -115,7 +115,7 @@ public abstract class SecurityConfigurerAdapter<O, B extends SecurityBuilder<O>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds an {@link ObjectPostProcessor} to use
|
* Adds an {@link ObjectPostProcessor} to use.
|
||||||
* @param objectPostProcessor the {@link ObjectPostProcessor} to add
|
* @param objectPostProcessor the {@link ObjectPostProcessor} to add
|
||||||
* @return true if the {@link ObjectPostProcessor} was added, else false
|
* @return true if the {@link ObjectPostProcessor} was added, else false
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ import org.springframework.security.authentication.ProviderManager;
|
|||||||
import org.springframework.security.config.annotation.SecurityBuilder;
|
import org.springframework.security.config.annotation.SecurityBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for operating on a SecurityBuilder that creates a {@link ProviderManager}
|
* Interface for operating on a SecurityBuilder that creates a {@link ProviderManager}.
|
||||||
*
|
*
|
||||||
* @param <B> the type of the {@link SecurityBuilder}
|
* @param <B> the type of the {@link SecurityBuilder}
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
|
|||||||
+3
-2
@@ -66,7 +66,7 @@ public class AuthenticationManagerBuilder
|
|||||||
private AuthenticationEventPublisher eventPublisher;
|
private AuthenticationEventPublisher eventPublisher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param objectPostProcessor the {@link ObjectPostProcessor} instance to use.
|
* @param objectPostProcessor the {@link ObjectPostProcessor} instance to use.
|
||||||
*/
|
*/
|
||||||
public AuthenticationManagerBuilder(ObjectPostProcessor<Object> objectPostProcessor) {
|
public AuthenticationManagerBuilder(ObjectPostProcessor<Object> objectPostProcessor) {
|
||||||
@@ -92,7 +92,7 @@ public class AuthenticationManagerBuilder
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@link AuthenticationEventPublisher}
|
* Sets the {@link AuthenticationEventPublisher}.
|
||||||
* @param eventPublisher the {@link AuthenticationEventPublisher} to use
|
* @param eventPublisher the {@link AuthenticationEventPublisher} to use
|
||||||
* @return the {@link AuthenticationManagerBuilder} for further customizations
|
* @return the {@link AuthenticationManagerBuilder} for further customizations
|
||||||
*/
|
*/
|
||||||
@@ -103,6 +103,7 @@ public class AuthenticationManagerBuilder
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Sets whether the {@link AuthenticationManager} should clear the credentials.
|
||||||
* @param eraseCredentials true if {@link AuthenticationManager} should clear the
|
* @param eraseCredentials true if {@link AuthenticationManager} should clear the
|
||||||
* credentials from the {@link Authentication} object after authenticating
|
* credentials from the {@link Authentication} object after authenticating
|
||||||
* @return the {@link AuthenticationManagerBuilder} for further customizations
|
* @return the {@link AuthenticationManagerBuilder} for further customizations
|
||||||
|
|||||||
+2
-2
@@ -53,7 +53,7 @@ import org.springframework.security.crypto.password.PasswordEncoder;
|
|||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exports the authentication {@link Configuration}
|
* Exports the authentication {@link Configuration}.
|
||||||
*
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @author Ngoc Nhan
|
* @author Ngoc Nhan
|
||||||
@@ -264,7 +264,7 @@ public class AuthenticationConfiguration {
|
|||||||
private PasswordEncoder defaultPasswordEncoder;
|
private PasswordEncoder defaultPasswordEncoder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param objectPostProcessor the {@link ObjectPostProcessor} instance to use.
|
* @param objectPostProcessor the {@link ObjectPostProcessor} instance to use.
|
||||||
*/
|
*/
|
||||||
DefaultPasswordEncoderAuthenticationManagerBuilder(ObjectPostProcessor<Object> objectPostProcessor,
|
DefaultPasswordEncoderAuthenticationManagerBuilder(ObjectPostProcessor<Object> objectPostProcessor,
|
||||||
|
|||||||
+1
@@ -42,6 +42,7 @@ class InitializeAuthenticationProviderBeanManagerConfigurer extends GlobalAuthen
|
|||||||
private final ApplicationContext context;
|
private final ApplicationContext context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Creates a new instance.
|
||||||
* @param context the ApplicationContext to look up beans.
|
* @param context the ApplicationContext to look up beans.
|
||||||
*/
|
*/
|
||||||
InitializeAuthenticationProviderBeanManagerConfigurer(ApplicationContext context) {
|
InitializeAuthenticationProviderBeanManagerConfigurer(ApplicationContext context) {
|
||||||
|
|||||||
+3
@@ -49,6 +49,7 @@ class InitializeUserDetailsBeanManagerConfigurer extends GlobalAuthenticationCon
|
|||||||
private final ApplicationContext context;
|
private final ApplicationContext context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Creates a new instance using the given {@link ApplicationContext}.
|
||||||
* @param context
|
* @param context
|
||||||
*/
|
*/
|
||||||
InitializeUserDetailsBeanManagerConfigurer(ApplicationContext context) {
|
InitializeUserDetailsBeanManagerConfigurer(ApplicationContext context) {
|
||||||
@@ -112,6 +113,8 @@ class InitializeUserDetailsBeanManagerConfigurer extends GlobalAuthenticationCon
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns a bean of the requested class if there's just a single registered
|
||||||
|
* component, null otherwise.
|
||||||
* @return a bean of the requested class if there's just a single registered
|
* @return a bean of the requested class if there's just a single registered
|
||||||
* component, null otherwise.
|
* component, null otherwise.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+10
-8
@@ -17,6 +17,7 @@
|
|||||||
package org.springframework.security.config.annotation.authentication.configurers.ldap;
|
package org.springframework.security.config.annotation.authentication.configurers.ldap;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.InetAddress;
|
||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
|
|
||||||
import org.springframework.ldap.core.support.BaseLdapPathContextSource;
|
import org.springframework.ldap.core.support.BaseLdapPathContextSource;
|
||||||
@@ -135,7 +136,7 @@ public class LdapAuthenticationProviderConfigurer<B extends ProviderManagerBuild
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the {@link LdapAuthoritiesPopulator} and defaults to
|
* Gets the {@link LdapAuthoritiesPopulator} and defaults to
|
||||||
* {@link DefaultLdapAuthoritiesPopulator}
|
* {@link DefaultLdapAuthoritiesPopulator}.
|
||||||
* @return the {@link LdapAuthoritiesPopulator}
|
* @return the {@link LdapAuthoritiesPopulator}
|
||||||
*/
|
*/
|
||||||
private LdapAuthoritiesPopulator getLdapAuthoritiesPopulator() {
|
private LdapAuthoritiesPopulator getLdapAuthoritiesPopulator() {
|
||||||
@@ -184,7 +185,7 @@ public class LdapAuthenticationProviderConfigurer<B extends ProviderManagerBuild
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the {@link LdapAuthenticator} to use
|
* Creates the {@link LdapAuthenticator} to use.
|
||||||
* @param contextSource the {@link BaseLdapPathContextSource} to use
|
* @param contextSource the {@link BaseLdapPathContextSource} to use
|
||||||
* @return the {@link LdapAuthenticator} to use
|
* @return the {@link LdapAuthenticator} to use
|
||||||
*/
|
*/
|
||||||
@@ -202,7 +203,7 @@ public class LdapAuthenticationProviderConfigurer<B extends ProviderManagerBuild
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates {@link PasswordComparisonAuthenticator}
|
* Creates {@link PasswordComparisonAuthenticator}.
|
||||||
* @param contextSource the {@link BaseLdapPathContextSource} to use
|
* @param contextSource the {@link BaseLdapPathContextSource} to use
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -217,7 +218,7 @@ public class LdapAuthenticationProviderConfigurer<B extends ProviderManagerBuild
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a {@link BindAuthenticator}
|
* Creates a {@link BindAuthenticator}.
|
||||||
* @param contextSource the {@link BaseLdapPathContextSource} to use
|
* @param contextSource the {@link BaseLdapPathContextSource} to use
|
||||||
* @return the {@link BindAuthenticator} to use
|
* @return the {@link BindAuthenticator} to use
|
||||||
*/
|
*/
|
||||||
@@ -394,6 +395,7 @@ public class LdapAuthenticationProviderConfigurer<B extends ProviderManagerBuild
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Enables password-based comparison for authentication.
|
||||||
* @return the {@link PasswordCompareConfigurer} for further customizations
|
* @return the {@link PasswordCompareConfigurer} for further customizations
|
||||||
*/
|
*/
|
||||||
public PasswordCompareConfigurer passwordCompare() {
|
public PasswordCompareConfigurer passwordCompare() {
|
||||||
@@ -402,7 +404,7 @@ public class LdapAuthenticationProviderConfigurer<B extends ProviderManagerBuild
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up Password based comparison
|
* Sets up Password based comparison.
|
||||||
*
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
@@ -433,7 +435,7 @@ public class LdapAuthenticationProviderConfigurer<B extends ProviderManagerBuild
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows obtaining a reference to the
|
* Allows obtaining a reference to the
|
||||||
* {@link LdapAuthenticationProviderConfigurer} for further customizations
|
* {@link LdapAuthenticationProviderConfigurer} for further customizations.
|
||||||
* @return attribute in the directory which contains the user password
|
* @return attribute in the directory which contains the user password
|
||||||
*/
|
*/
|
||||||
public LdapAuthenticationProviderConfigurer<B> and() {
|
public LdapAuthenticationProviderConfigurer<B> and() {
|
||||||
@@ -546,7 +548,7 @@ public class LdapAuthenticationProviderConfigurer<B extends ProviderManagerBuild
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the {@link LdapAuthenticationProviderConfigurer} for further
|
* Gets the {@link LdapAuthenticationProviderConfigurer} for further
|
||||||
* customizations
|
* customizations.
|
||||||
* @return the {@link LdapAuthenticationProviderConfigurer} for further
|
* @return the {@link LdapAuthenticationProviderConfigurer} for further
|
||||||
* customizations
|
* customizations
|
||||||
*/
|
*/
|
||||||
@@ -590,7 +592,7 @@ public class LdapAuthenticationProviderConfigurer<B extends ProviderManagerBuild
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getDefaultPort() {
|
private int getDefaultPort() {
|
||||||
try (ServerSocket serverSocket = new ServerSocket(DEFAULT_PORT)) {
|
try (ServerSocket serverSocket = new ServerSocket(DEFAULT_PORT, 50, InetAddress.getLoopbackAddress())) {
|
||||||
return serverSocket.getLocalPort();
|
return serverSocket.getLocalPort();
|
||||||
}
|
}
|
||||||
catch (IOException ex) {
|
catch (IOException ex) {
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ public class InMemoryUserDetailsManagerConfigurer<B extends ProviderManagerBuild
|
|||||||
extends UserDetailsManagerConfigurer<B, InMemoryUserDetailsManagerConfigurer<B>> {
|
extends UserDetailsManagerConfigurer<B, InMemoryUserDetailsManagerConfigurer<B>> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
*/
|
*/
|
||||||
public InMemoryUserDetailsManagerConfigurer() {
|
public InMemoryUserDetailsManagerConfigurer() {
|
||||||
super(new InMemoryUserDetailsManager(new ArrayList<>()));
|
super(new InMemoryUserDetailsManager(new ArrayList<>()));
|
||||||
|
|||||||
+1
-1
@@ -140,7 +140,7 @@ public class JdbcUserDetailsManagerConfigurer<B extends ProviderManagerBuilder<B
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the {@link UserCache} to use
|
* Defines the {@link UserCache} to use.
|
||||||
* @param userCache the {@link UserCache} to use
|
* @param userCache the {@link UserCache} to use
|
||||||
* @return the {@link JdbcUserDetailsManagerConfigurer} for further customizations
|
* @return the {@link JdbcUserDetailsManagerConfigurer} for further customizations
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -112,7 +112,7 @@ public class UserDetailsManagerConfigurer<B extends ProviderManagerBuilder<B>, C
|
|||||||
private final C builder;
|
private final C builder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param builder the builder to return
|
* @param builder the builder to return
|
||||||
*/
|
*/
|
||||||
private UserDetailsBuilder(C builder) {
|
private UserDetailsBuilder(C builder) {
|
||||||
|
|||||||
+3
-3
@@ -25,7 +25,7 @@ import org.springframework.security.core.userdetails.UserDetailsService;
|
|||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows configuring a {@link DaoAuthenticationProvider}
|
* Allows configuring a {@link DaoAuthenticationProvider}.
|
||||||
*
|
*
|
||||||
* @param <B> the type of the {@link SecurityBuilder}
|
* @param <B> the type of the {@link SecurityBuilder}
|
||||||
* @param <C> the type of {@link AbstractDaoAuthenticationConfigurer} this is
|
* @param <C> the type of {@link AbstractDaoAuthenticationConfigurer} this is
|
||||||
@@ -41,7 +41,7 @@ public abstract class AbstractDaoAuthenticationConfigurer<B extends ProviderMana
|
|||||||
private final U userDetailsService;
|
private final U userDetailsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param userDetailsService
|
* @param userDetailsService
|
||||||
*/
|
*/
|
||||||
AbstractDaoAuthenticationConfigurer(U userDetailsService) {
|
AbstractDaoAuthenticationConfigurer(U userDetailsService) {
|
||||||
@@ -88,7 +88,7 @@ public abstract class AbstractDaoAuthenticationConfigurer<B extends ProviderMana
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the {@link UserDetailsService} that is used with the
|
* Gets the {@link UserDetailsService} that is used with the
|
||||||
* {@link DaoAuthenticationProvider}
|
* {@link DaoAuthenticationProvider}.
|
||||||
* @return the {@link UserDetailsService} that is used with the
|
* @return the {@link UserDetailsService} that is used with the
|
||||||
* {@link DaoAuthenticationProvider}
|
* {@link DaoAuthenticationProvider}
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-2
@@ -21,7 +21,7 @@ import org.springframework.security.config.annotation.authentication.ProviderMan
|
|||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows configuring a {@link DaoAuthenticationProvider}
|
* Allows configuring a {@link DaoAuthenticationProvider}.
|
||||||
*
|
*
|
||||||
* @param <B> The type of {@link ProviderManagerBuilder} this is
|
* @param <B> The type of {@link ProviderManagerBuilder} this is
|
||||||
* @param <U> The type of {@link UserDetailsService} that is being used
|
* @param <U> The type of {@link UserDetailsService} that is being used
|
||||||
@@ -32,7 +32,7 @@ public class DaoAuthenticationConfigurer<B extends ProviderManagerBuilder<B>, U
|
|||||||
extends AbstractDaoAuthenticationConfigurer<B, DaoAuthenticationConfigurer<B, U>, U> {
|
extends AbstractDaoAuthenticationConfigurer<B, DaoAuthenticationConfigurer<B, U>, U> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param userDetailsService
|
* @param userDetailsService
|
||||||
*/
|
*/
|
||||||
public DaoAuthenticationConfigurer(U userDetailsService) {
|
public DaoAuthenticationConfigurer(U userDetailsService) {
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ public abstract class UserDetailsAwareConfigurer<B extends ProviderManagerBuilde
|
|||||||
extends SecurityConfigurerAdapter<AuthenticationManager, B> {
|
extends SecurityConfigurerAdapter<AuthenticationManager, B> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the {@link UserDetailsService} or null if it is not available
|
* Gets the {@link UserDetailsService} or null if it is not available.
|
||||||
* @return the {@link UserDetailsService} or null if it is not available
|
* @return the {@link UserDetailsService} or null if it is not available
|
||||||
*/
|
*/
|
||||||
public abstract U getUserDetailsService();
|
public abstract U getUserDetailsService();
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ public class UserDetailsServiceConfigurer<B extends ProviderManagerBuilder<B>, C
|
|||||||
extends AbstractDaoAuthenticationConfigurer<B, C, U> {
|
extends AbstractDaoAuthenticationConfigurer<B, C, U> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param userDetailsService the {@link UserDetailsService} that should be used
|
* @param userDetailsService the {@link UserDetailsService} that should be used
|
||||||
*/
|
*/
|
||||||
public UserDetailsServiceConfigurer(U userDetailsService) {
|
public UserDetailsServiceConfigurer(U userDetailsService) {
|
||||||
|
|||||||
+2
@@ -28,6 +28,8 @@ import org.springframework.core.Ordered;
|
|||||||
import org.springframework.security.authorization.ReactiveAuthorizationManager;
|
import org.springframework.security.authorization.ReactiveAuthorizationManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Enables Spring Security reactive method security.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
@@ -39,6 +39,8 @@ import org.springframework.security.access.prepost.PrePostAnnotationSecurityMeta
|
|||||||
import org.springframework.security.config.core.GrantedAuthorityDefaults;
|
import org.springframework.security.config.core.GrantedAuthorityDefaults;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Configures the infrastructure beans for reactive method security.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @author Tadaya Tsuyukubo
|
* @author Tadaya Tsuyukubo
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
|
|||||||
+2
@@ -30,6 +30,8 @@ import org.springframework.util.Assert;
|
|||||||
import org.springframework.util.ClassUtils;
|
import org.springframework.util.ClassUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Selects the imports to register for {@link EnableReactiveMethodSecurity}.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @author Evgeniy Cheban
|
* @author Evgeniy Cheban
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
|
|||||||
+11
-8
@@ -154,7 +154,7 @@ public class RSocketSecurity {
|
|||||||
/**
|
/**
|
||||||
* Adds support for validating a username and password using <a href=
|
* Adds support for validating a username and password using <a href=
|
||||||
* "https://github.com/rsocket/rsocket/blob/5920ed374d008abb712cb1fd7c9d91778b2f4a68/Extensions/Security/Simple.md">Simple
|
* "https://github.com/rsocket/rsocket/blob/5920ed374d008abb712cb1fd7c9d91778b2f4a68/Extensions/Security/Simple.md">Simple
|
||||||
* Authentication</a>
|
* Authentication</a>.
|
||||||
* @param simple a customizer
|
* @param simple a customizer
|
||||||
* @return RSocketSecurity for additional configuration
|
* @return RSocketSecurity for additional configuration
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
@@ -168,7 +168,7 @@ public class RSocketSecurity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds anonymous authentication
|
* Adds anonymous authentication.
|
||||||
* @param anonymous a customizer
|
* @param anonymous a customizer
|
||||||
* @return this instance
|
* @return this instance
|
||||||
* @since 7.0
|
* @since 7.0
|
||||||
@@ -265,6 +265,9 @@ public class RSocketSecurity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Specifies the {@link ReactiveAuthenticationManager} to use for simple
|
||||||
|
* authentication.
|
||||||
|
*
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public final class SimpleAuthenticationSpec {
|
public final class SimpleAuthenticationSpec {
|
||||||
@@ -286,7 +289,7 @@ public class RSocketSecurity {
|
|||||||
return this.authenticationManager;
|
return this.authenticationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AuthenticationPayloadInterceptor build() {
|
AuthenticationPayloadInterceptor build() {
|
||||||
ReactiveAuthenticationManager manager = getAuthenticationManager();
|
ReactiveAuthenticationManager manager = getAuthenticationManager();
|
||||||
AuthenticationPayloadInterceptor result = new AuthenticationPayloadInterceptor(manager);
|
AuthenticationPayloadInterceptor result = new AuthenticationPayloadInterceptor(manager);
|
||||||
result.setAuthenticationConverter(new AuthenticationPayloadExchangeConverter());
|
result.setAuthenticationConverter(new AuthenticationPayloadExchangeConverter());
|
||||||
@@ -304,7 +307,7 @@ public class RSocketSecurity {
|
|||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AnonymousPayloadInterceptor build() {
|
AnonymousPayloadInterceptor build() {
|
||||||
AnonymousPayloadInterceptor result = new AnonymousPayloadInterceptor("anonymousUser");
|
AnonymousPayloadInterceptor result = new AnonymousPayloadInterceptor("anonymousUser");
|
||||||
result.setOrder(PayloadInterceptorOrder.ANONYMOUS.getOrder());
|
result.setOrder(PayloadInterceptorOrder.ANONYMOUS.getOrder());
|
||||||
return result;
|
return result;
|
||||||
@@ -335,7 +338,7 @@ public class RSocketSecurity {
|
|||||||
return this.authenticationManager;
|
return this.authenticationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AuthenticationPayloadInterceptor build() {
|
AuthenticationPayloadInterceptor build() {
|
||||||
ReactiveAuthenticationManager manager = getAuthenticationManager();
|
ReactiveAuthenticationManager manager = getAuthenticationManager();
|
||||||
AuthenticationPayloadInterceptor result = new AuthenticationPayloadInterceptor(manager);
|
AuthenticationPayloadInterceptor result = new AuthenticationPayloadInterceptor(manager);
|
||||||
result.setOrder(PayloadInterceptorOrder.AUTHENTICATION.getOrder());
|
result.setOrder(PayloadInterceptorOrder.AUTHENTICATION.getOrder());
|
||||||
@@ -368,7 +371,7 @@ public class RSocketSecurity {
|
|||||||
return RSocketSecurity.this.authenticationManager;
|
return RSocketSecurity.this.authenticationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<AuthenticationPayloadInterceptor> build() {
|
List<AuthenticationPayloadInterceptor> build() {
|
||||||
ReactiveAuthenticationManager manager = getAuthenticationManager();
|
ReactiveAuthenticationManager manager = getAuthenticationManager();
|
||||||
AuthenticationPayloadInterceptor legacy = new AuthenticationPayloadInterceptor(manager);
|
AuthenticationPayloadInterceptor legacy = new AuthenticationPayloadInterceptor(manager);
|
||||||
legacy.setAuthenticationConverter(new BearerPayloadExchangeConverter());
|
legacy.setAuthenticationConverter(new BearerPayloadExchangeConverter());
|
||||||
@@ -393,7 +396,7 @@ public class RSocketSecurity {
|
|||||||
/**
|
/**
|
||||||
* Matches if
|
* Matches if
|
||||||
* {@link org.springframework.security.rsocket.api.PayloadExchangeType#isRequest()}
|
* {@link org.springframework.security.rsocket.api.PayloadExchangeType#isRequest()}
|
||||||
* is true, else not a match
|
* is true, else not a match.
|
||||||
* @return the Access to set up the authorization rule.
|
* @return the Access to set up the authorization rule.
|
||||||
*/
|
*/
|
||||||
public Access anyRequest() {
|
public Access anyRequest() {
|
||||||
@@ -401,7 +404,7 @@ public class RSocketSecurity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Always matches
|
* Always matches.
|
||||||
* @return the Access to set up the authorization rule.
|
* @return the Access to set up the authorization rule.
|
||||||
*/
|
*/
|
||||||
public Access anyExchange() {
|
public Access anyExchange() {
|
||||||
|
|||||||
+2
@@ -30,6 +30,8 @@ import org.springframework.security.core.userdetails.ReactiveUserDetailsService;
|
|||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* {@link Configuration} for RSocket security infrastructure beans.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @since 5.2
|
* @since 5.2
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
@@ -26,6 +26,8 @@ import org.springframework.security.rsocket.core.SecuritySocketAcceptorIntercept
|
|||||||
import org.springframework.security.rsocket.util.matcher.PayloadExchangeMatcher.MatchResult;
|
import org.springframework.security.rsocket.util.matcher.PayloadExchangeMatcher.MatchResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* {@link Configuration} that exposes a {@link SecuritySocketAcceptorInterceptor} bean.
|
||||||
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @since 5.2
|
* @since 5.2
|
||||||
*/
|
*/
|
||||||
|
|||||||
+3
-2
@@ -61,7 +61,7 @@ public abstract class AbstractRequestMatcherRegistry<C> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the {@link ApplicationContext}
|
* Gets the {@link ApplicationContext}.
|
||||||
* @return the {@link ApplicationContext}
|
* @return the {@link ApplicationContext}
|
||||||
*/
|
*/
|
||||||
protected final ApplicationContext getApplicationContext() {
|
protected final ApplicationContext getApplicationContext() {
|
||||||
@@ -111,7 +111,7 @@ public abstract class AbstractRequestMatcherRegistry<C> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Associates a list of {@link RequestMatcher} instances with the
|
* Associates a list of {@link RequestMatcher} instances with the
|
||||||
* {@link AbstractRequestMatcherRegistry}
|
* {@link AbstractRequestMatcherRegistry}.
|
||||||
* @param requestMatchers the {@link RequestMatcher} instances
|
* @param requestMatchers the {@link RequestMatcher} instances
|
||||||
* @return the object that is chained after creating the {@link RequestMatcher}
|
* @return the object that is chained after creating the {@link RequestMatcher}
|
||||||
*/
|
*/
|
||||||
@@ -203,6 +203,7 @@ public abstract class AbstractRequestMatcherRegistry<C> {
|
|||||||
* If a specific {@link RequestMatcher} must be specified, use
|
* If a specific {@link RequestMatcher} must be specified, use
|
||||||
* {@link #requestMatchers(RequestMatcher...)} instead
|
* {@link #requestMatchers(RequestMatcher...)} instead
|
||||||
* </p>
|
* </p>
|
||||||
|
* .
|
||||||
* @param method the {@link HttpMethod} to use or {@code null} for any
|
* @param method the {@link HttpMethod} to use or {@code null} for any
|
||||||
* {@link HttpMethod}.
|
* {@link HttpMethod}.
|
||||||
* @return the object that is chained after creating the {@link RequestMatcher}.
|
* @return the object that is chained after creating the {@link RequestMatcher}.
|
||||||
|
|||||||
+5
-2
@@ -53,6 +53,9 @@ import org.springframework.security.web.session.SessionManagementFilter;
|
|||||||
import org.springframework.web.filter.CorsFilter;
|
import org.springframework.web.filter.CorsFilter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A builder for a {@link DefaultSecurityFilterChain} that allows configuring and ordering
|
||||||
|
* the standard Spring Security {@link Filter} instances.
|
||||||
|
*
|
||||||
* @param <H>
|
* @param <H>
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
@@ -89,14 +92,14 @@ public interface HttpSecurityBuilder<H extends HttpSecurityBuilder<H>>
|
|||||||
<C> C getSharedObject(Class<C> sharedType);
|
<C> C getSharedObject(Class<C> sharedType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows adding an additional {@link AuthenticationProvider} to be used
|
* Allows adding an additional {@link AuthenticationProvider} to be used.
|
||||||
* @param authenticationProvider the {@link AuthenticationProvider} to be added
|
* @param authenticationProvider the {@link AuthenticationProvider} to be added
|
||||||
* @return the {@link HttpSecurity} for further customizations
|
* @return the {@link HttpSecurity} for further customizations
|
||||||
*/
|
*/
|
||||||
H authenticationProvider(AuthenticationProvider authenticationProvider);
|
H authenticationProvider(AuthenticationProvider authenticationProvider);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows adding an additional {@link UserDetailsService} to be used
|
* Allows adding an additional {@link UserDetailsService} to be used.
|
||||||
* @param userDetailsService the {@link UserDetailsService} to be added
|
* @param userDetailsService the {@link UserDetailsService} to be added
|
||||||
* @return the {@link HttpSecurity} for further customizations
|
* @return the {@link HttpSecurity} for further customizations
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-2
@@ -159,7 +159,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
|
|||||||
private AuthenticationManager authenticationManager;
|
private AuthenticationManager authenticationManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param objectPostProcessor the {@link ObjectPostProcessor} that should be used
|
* @param objectPostProcessor the {@link ObjectPostProcessor} that should be used
|
||||||
* @param authenticationBuilder the {@link AuthenticationManagerBuilder} to use for
|
* @param authenticationBuilder the {@link AuthenticationManagerBuilder} to use for
|
||||||
* additional updates
|
* additional updates
|
||||||
@@ -2094,7 +2094,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows mapping HTTP requests that this {@link HttpSecurity} will be used for
|
* Allows mapping HTTP requests that this {@link HttpSecurity} will be used for.
|
||||||
*
|
*
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @since 3.2
|
* @since 3.2
|
||||||
|
|||||||
+3
-3
@@ -144,7 +144,7 @@ public final class WebSecurity extends AbstractConfiguredSecurityBuilder<Filter,
|
|||||||
private ServletContext servletContext;
|
private ServletContext servletContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param objectPostProcessor the {@link ObjectPostProcessor} to use
|
* @param objectPostProcessor the {@link ObjectPostProcessor} to use
|
||||||
* @see WebSecurityConfiguration
|
* @see WebSecurityConfiguration
|
||||||
*/
|
*/
|
||||||
@@ -279,7 +279,7 @@ public final class WebSecurity extends AbstractConfiguredSecurityBuilder<Filter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the Runnable immediately after the build takes place
|
* Executes the Runnable immediately after the build takes place.
|
||||||
* @param postBuildAction
|
* @param postBuildAction
|
||||||
* @return the {@link WebSecurity} for further customizations
|
* @return the {@link WebSecurity} for further customizations
|
||||||
*/
|
*/
|
||||||
@@ -290,7 +290,7 @@ public final class WebSecurity extends AbstractConfiguredSecurityBuilder<Filter,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the handler to handle
|
* Sets the handler to handle
|
||||||
* {@link org.springframework.security.web.firewall.RequestRejectedException}
|
* {@link org.springframework.security.web.firewall.RequestRejectedException}.
|
||||||
* @param requestRejectedHandler
|
* @param requestRejectedHandler
|
||||||
* @return the {@link WebSecurity} for further customizations
|
* @return the {@link WebSecurity} for further customizations
|
||||||
* @since 5.7
|
* @since 5.7
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ import org.springframework.security.web.util.matcher.AnyRequestMatcher;
|
|||||||
import org.springframework.util.ClassUtils;
|
import org.springframework.util.ClassUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A filter chain validator for filter chains built by {@link WebSecurity}
|
* A filter chain validator for filter chains built by {@link WebSecurity}.
|
||||||
*
|
*
|
||||||
* @author Josh Cummings
|
* @author Josh Cummings
|
||||||
* @author Max Batischev
|
* @author Max Batischev
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ import org.springframework.security.web.SecurityFilterChain;
|
|||||||
/**
|
/**
|
||||||
* Add this annotation to an {@code @Configuration} class to have the Spring Security
|
* Add this annotation to an {@code @Configuration} class to have the Spring Security
|
||||||
* configuration defined in any {@link WebSecurityConfigurer} or more likely by exposing a
|
* configuration defined in any {@link WebSecurityConfigurer} or more likely by exposing a
|
||||||
* {@link SecurityFilterChain} bean:
|
* {@link SecurityFilterChain} bean:.
|
||||||
*
|
*
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
* @Configuration
|
* @Configuration
|
||||||
|
|||||||
+1
-1
@@ -255,7 +255,7 @@ class HttpSecurityConfiguration {
|
|||||||
private PasswordEncoder defaultPasswordEncoder;
|
private PasswordEncoder defaultPasswordEncoder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param objectPostProcessor the {@link ObjectPostProcessor} instance to use.
|
* @param objectPostProcessor the {@link ObjectPostProcessor} instance to use.
|
||||||
*/
|
*/
|
||||||
DefaultPasswordEncoderAuthenticationManagerBuilder(ObjectPostProcessor<Object> objectPostProcessor,
|
DefaultPasswordEncoderAuthenticationManagerBuilder(ObjectPostProcessor<Object> objectPostProcessor,
|
||||||
|
|||||||
+2
@@ -101,6 +101,8 @@ final class OAuth2ClientConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Configures the infrastructure beans for the {@code OAuth2AuthorizedClientManager}.
|
||||||
|
*
|
||||||
* @author Joe Grandja
|
* @author Joe Grandja
|
||||||
* @since 6.2.0
|
* @since 6.2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ import org.springframework.util.ClassUtils;
|
|||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by {@link EnableWebSecurity} to conditionally import:
|
* Used by {@link EnableWebSecurity} to conditionally import:.
|
||||||
*
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@link OAuth2ClientConfiguration} when the {@code spring-security-oauth2-client}
|
* <li>{@link OAuth2ClientConfiguration} when the {@code spring-security-oauth2-client}
|
||||||
|
|||||||
+1
-1
@@ -199,7 +199,7 @@ class SecurityReactorContextConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map that computes each value when {@link #get} is invoked
|
* A map that computes each value when {@link #get} is invoked.
|
||||||
*/
|
*/
|
||||||
static class LoadingMap<K, V> implements Map<K, V> {
|
static class LoadingMap<K, V> implements Map<K, V> {
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -118,14 +118,14 @@ class WebMvcSecurityConfiguration implements WebMvcConfigurer, ApplicationContex
|
|||||||
static class CompositeFilterChainProxy extends FilterChainProxy {
|
static class CompositeFilterChainProxy extends FilterChainProxy {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used for {@link #doFilter(ServletRequest, ServletResponse, FilterChain)}
|
* Used for {@link #doFilter(ServletRequest, ServletResponse, FilterChain)}.
|
||||||
*/
|
*/
|
||||||
private final Filter doFilterDelegate;
|
private final Filter doFilterDelegate;
|
||||||
|
|
||||||
private final FilterChainProxy springSecurityFilterChain;
|
private final FilterChainProxy springSecurityFilterChain;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param filters the Filters to delegate to. One of which must be
|
* @param filters the Filters to delegate to. One of which must be
|
||||||
* FilterChainProxy.
|
* FilterChainProxy.
|
||||||
*/
|
*/
|
||||||
@@ -197,7 +197,7 @@ class WebMvcSecurityConfiguration implements WebMvcConfigurer, ApplicationContex
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the Filter to delegate to for doFilter
|
* Creates the Filter to delegate to for doFilter.
|
||||||
* @param filters the Filters to delegate to.
|
* @param filters the Filters to delegate to.
|
||||||
* @return the Filter for doFilter
|
* @return the Filter for doFilter
|
||||||
*/
|
*/
|
||||||
@@ -208,7 +208,7 @@ class WebMvcSecurityConfiguration implements WebMvcConfigurer, ApplicationContex
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the FilterChainProxy in a List of Filter
|
* Find the FilterChainProxy in a List of Filter.
|
||||||
* @param filters
|
* @param filters
|
||||||
* @return non-null FilterChainProxy
|
* @return non-null FilterChainProxy
|
||||||
* @throws IllegalStateException if the FilterChainProxy cannot be found
|
* @throws IllegalStateException if the FilterChainProxy cannot be found
|
||||||
|
|||||||
+6
-6
@@ -106,7 +106,7 @@ public class WebSecurityConfiguration implements ImportAware {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the Spring Security Filter Chain
|
* Creates the Spring Security Filter Chain.
|
||||||
* @return the {@link Filter} that represents the security filter chain
|
* @return the {@link Filter} that represents the security filter chain
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@@ -133,7 +133,7 @@ public class WebSecurityConfiguration implements ImportAware {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the {@link WebInvocationPrivilegeEvaluator} that is necessary to evaluate
|
* Creates the {@link WebInvocationPrivilegeEvaluator} that is necessary to evaluate
|
||||||
* privileges for a given web URI
|
* privileges for a given web URI.
|
||||||
* @return the {@link WebInvocationPrivilegeEvaluator}
|
* @return the {@link WebInvocationPrivilegeEvaluator}
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
@@ -290,14 +290,14 @@ public class WebSecurityConfiguration implements ImportAware {
|
|||||||
static class CompositeFilterChainProxy extends FilterChainProxy {
|
static class CompositeFilterChainProxy extends FilterChainProxy {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used for {@link #doFilter(ServletRequest, ServletResponse, FilterChain)}
|
* Used for {@link #doFilter(ServletRequest, ServletResponse, FilterChain)}.
|
||||||
*/
|
*/
|
||||||
private final Filter doFilterDelegate;
|
private final Filter doFilterDelegate;
|
||||||
|
|
||||||
private final FilterChainProxy springSecurityFilterChain;
|
private final FilterChainProxy springSecurityFilterChain;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param filters the Filters to delegate to. One of which must be
|
* @param filters the Filters to delegate to. One of which must be
|
||||||
* FilterChainProxy.
|
* FilterChainProxy.
|
||||||
*/
|
*/
|
||||||
@@ -369,7 +369,7 @@ public class WebSecurityConfiguration implements ImportAware {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the Filter to delegate to for doFilter
|
* Creates the Filter to delegate to for doFilter.
|
||||||
* @param filters the Filters to delegate to.
|
* @param filters the Filters to delegate to.
|
||||||
* @return the Filter for doFilter
|
* @return the Filter for doFilter
|
||||||
*/
|
*/
|
||||||
@@ -380,7 +380,7 @@ public class WebSecurityConfiguration implements ImportAware {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the FilterChainProxy in a List of Filter
|
* Find the FilterChainProxy in a List of Filter.
|
||||||
* @param filters
|
* @param filters
|
||||||
* @return non-null FilterChainProxy
|
* @return non-null FilterChainProxy
|
||||||
* @throws IllegalStateException if the FilterChainProxy cannot be found
|
* @throws IllegalStateException if the FilterChainProxy cannot be found
|
||||||
|
|||||||
+10
-9
@@ -85,14 +85,14 @@ public abstract class AbstractAuthenticationFilterConfigurer<B extends HttpSecur
|
|||||||
private String failureUrl;
|
private String failureUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance with minimal defaults
|
* Creates a new instance with minimal defaults.
|
||||||
*/
|
*/
|
||||||
protected AbstractAuthenticationFilterConfigurer() {
|
protected AbstractAuthenticationFilterConfigurer() {
|
||||||
setLoginPage("/login");
|
setLoginPage("/login");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @param authenticationFilter the {@link AbstractAuthenticationProcessingFilter} to
|
* @param authenticationFilter the {@link AbstractAuthenticationProcessingFilter} to
|
||||||
* use
|
* use
|
||||||
* @param defaultLoginProcessingUrl the default URL to use for
|
* @param defaultLoginProcessingUrl the default URL to use for
|
||||||
@@ -152,7 +152,7 @@ public abstract class AbstractAuthenticationFilterConfigurer<B extends HttpSecur
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create the {@link RequestMatcher} given a loginProcessingUrl
|
* Create the {@link RequestMatcher} given a loginProcessingUrl.
|
||||||
* @param loginProcessingUrl creates the {@link RequestMatcher} based upon the
|
* @param loginProcessingUrl creates the {@link RequestMatcher} based upon the
|
||||||
* loginProcessingUrl
|
* loginProcessingUrl
|
||||||
* @return the {@link RequestMatcher} to use based upon the loginProcessingUrl
|
* @return the {@link RequestMatcher} to use based upon the loginProcessingUrl
|
||||||
@@ -184,7 +184,7 @@ public abstract class AbstractAuthenticationFilterConfigurer<B extends HttpSecur
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Equivalent of invoking permitAll(true)
|
* Equivalent of invoking permitAll(true).
|
||||||
* @return the {@link FormLoginConfigurer} for additional customization
|
* @return the {@link FormLoginConfigurer} for additional customization
|
||||||
*/
|
*/
|
||||||
public final T permitAll() {
|
public final T permitAll() {
|
||||||
@@ -324,6 +324,7 @@ public abstract class AbstractAuthenticationFilterConfigurer<B extends HttpSecur
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns true if a custom login page has been specified.
|
||||||
* @return true if a custom login page has been specified, else false
|
* @return true if a custom login page has been specified, else false
|
||||||
*/
|
*/
|
||||||
public final boolean isCustomLoginPage() {
|
public final boolean isCustomLoginPage() {
|
||||||
@@ -331,7 +332,7 @@ public abstract class AbstractAuthenticationFilterConfigurer<B extends HttpSecur
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Authentication Filter
|
* Gets the Authentication Filter.
|
||||||
* @return the Authentication Filter
|
* @return the Authentication Filter
|
||||||
*/
|
*/
|
||||||
protected final F getAuthenticationFilter() {
|
protected final F getAuthenticationFilter() {
|
||||||
@@ -339,7 +340,7 @@ public abstract class AbstractAuthenticationFilterConfigurer<B extends HttpSecur
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Authentication Filter
|
* Sets the Authentication Filter.
|
||||||
* @param authFilter the Authentication Filter
|
* @param authFilter the Authentication Filter
|
||||||
*/
|
*/
|
||||||
protected final void setAuthenticationFilter(F authFilter) {
|
protected final void setAuthenticationFilter(F authFilter) {
|
||||||
@@ -347,7 +348,7 @@ public abstract class AbstractAuthenticationFilterConfigurer<B extends HttpSecur
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the login page
|
* Gets the login page.
|
||||||
* @return the login page
|
* @return the login page
|
||||||
*/
|
*/
|
||||||
protected final String getLoginPage() {
|
protected final String getLoginPage() {
|
||||||
@@ -355,7 +356,7 @@ public abstract class AbstractAuthenticationFilterConfigurer<B extends HttpSecur
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Authentication Entry Point
|
* Gets the Authentication Entry Point.
|
||||||
* @return the Authentication Entry Point
|
* @return the Authentication Entry Point
|
||||||
*/
|
*/
|
||||||
protected final AuthenticationEntryPoint getAuthenticationEntryPoint() {
|
protected final AuthenticationEntryPoint getAuthenticationEntryPoint() {
|
||||||
@@ -372,7 +373,7 @@ public abstract class AbstractAuthenticationFilterConfigurer<B extends HttpSecur
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the URL to send users to if authentication fails
|
* Gets the URL to send users to if authentication fails.
|
||||||
* @return the URL to send users if authentication fails (e.g. "/login?error").
|
* @return the URL to send users if authentication fails (e.g. "/login?error").
|
||||||
*/
|
*/
|
||||||
protected final String getFailureUrl() {
|
protected final String getFailureUrl() {
|
||||||
|
|||||||
+2
-2
@@ -105,7 +105,7 @@ public abstract class AbstractConfigAttributeRequestMatcherRegistry<C> extends A
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the mapping of {@link RequestMatcher} to {@link Collection} of
|
* Creates the mapping of {@link RequestMatcher} to {@link Collection} of
|
||||||
* {@link ConfigAttribute} instances
|
* {@link ConfigAttribute} instances.
|
||||||
* @return the mapping of {@link RequestMatcher} to {@link Collection} of
|
* @return the mapping of {@link RequestMatcher} to {@link Collection} of
|
||||||
* {@link ConfigAttribute} instances. Cannot be null.
|
* {@link ConfigAttribute} instances. Cannot be null.
|
||||||
*/
|
*/
|
||||||
@@ -123,7 +123,7 @@ public abstract class AbstractConfigAttributeRequestMatcherRegistry<C> extends A
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A mapping of {@link RequestMatcher} to {@link Collection} of
|
* A mapping of {@link RequestMatcher} to {@link Collection} of
|
||||||
* {@link ConfigAttribute} instances
|
* {@link ConfigAttribute} instances.
|
||||||
*/
|
*/
|
||||||
static final class UrlMapping {
|
static final class UrlMapping {
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -57,7 +57,7 @@ public final class AnonymousConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
private String computedKey;
|
private String computedKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @see HttpSecurity#anonymous(Customizer)
|
* @see HttpSecurity#anonymous(Customizer)
|
||||||
*/
|
*/
|
||||||
public AnonymousConfigurer() {
|
public AnonymousConfigurer() {
|
||||||
@@ -77,7 +77,7 @@ public final class AnonymousConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the principal for {@link Authentication} objects of anonymous users
|
* Sets the principal for {@link Authentication} objects of anonymous users.
|
||||||
* @param principal used for the {@link Authentication} object of anonymous users
|
* @param principal used for the {@link Authentication} object of anonymous users
|
||||||
* @return the {@link AnonymousConfigurer} for further customization of anonymous
|
* @return the {@link AnonymousConfigurer} for further customization of anonymous
|
||||||
* authentication
|
* authentication
|
||||||
@@ -89,7 +89,7 @@ public final class AnonymousConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@link org.springframework.security.core.Authentication#getAuthorities()}
|
* Sets the {@link org.springframework.security.core.Authentication#getAuthorities()}
|
||||||
* for anonymous users
|
* for anonymous users.
|
||||||
* @param authorities Sets the
|
* @param authorities Sets the
|
||||||
* {@link org.springframework.security.core.Authentication#getAuthorities()} for
|
* {@link org.springframework.security.core.Authentication#getAuthorities()} for
|
||||||
* anonymous users
|
* anonymous users
|
||||||
@@ -103,7 +103,7 @@ public final class AnonymousConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@link org.springframework.security.core.Authentication#getAuthorities()}
|
* Sets the {@link org.springframework.security.core.Authentication#getAuthorities()}
|
||||||
* for anonymous users
|
* for anonymous users.
|
||||||
* @param authorities Sets the
|
* @param authorities Sets the
|
||||||
* {@link org.springframework.security.core.Authentication#getAuthorities()} for
|
* {@link org.springframework.security.core.Authentication#getAuthorities()} for
|
||||||
* anonymous users (i.e. "ROLE_ANONYMOUS")
|
* anonymous users (i.e. "ROLE_ANONYMOUS")
|
||||||
|
|||||||
+2
-2
@@ -414,7 +414,7 @@ public final class AuthorizeHttpRequestsConfigurer<H extends HttpSecurityBuilder
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* An object that allows configuring {@link RequestMatcher}s with URI path
|
* An object that allows configuring {@link RequestMatcher}s with URI path
|
||||||
* variables
|
* variables.
|
||||||
*
|
*
|
||||||
* @author Taehong Kim
|
* @author Taehong Kim
|
||||||
* @since 6.3
|
* @since 6.3
|
||||||
@@ -433,7 +433,7 @@ public final class AuthorizeHttpRequestsConfigurer<H extends HttpSecurityBuilder
|
|||||||
* <p>
|
* <p>
|
||||||
* For example, <pre>
|
* For example, <pre>
|
||||||
* requestMatchers("/user/{username}").hasVariable("username").equalTo(Authentication::getName));
|
* requestMatchers("/user/{username}").hasVariable("username").equalTo(Authentication::getName));
|
||||||
* </pre>
|
* </pre>.
|
||||||
* @param function a function to get value from {@link Authentication}.
|
* @param function a function to get value from {@link Authentication}.
|
||||||
* @return the {@link AuthorizationManagerRequestMatcherRegistry} for further
|
* @return the {@link AuthorizationManagerRequestMatcherRegistry} for further
|
||||||
* customization.
|
* customization.
|
||||||
|
|||||||
+9
-3
@@ -92,7 +92,7 @@ public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
private final ChannelRequestMatcherRegistry REGISTRY;
|
private final ChannelRequestMatcherRegistry REGISTRY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @see HttpSecurity#requiresChannel(Customizer)
|
* @see HttpSecurity#requiresChannel(Customizer)
|
||||||
*/
|
*/
|
||||||
public ChannelSecurityConfigurer(ApplicationContext context) {
|
public ChannelSecurityConfigurer(ApplicationContext context) {
|
||||||
@@ -147,6 +147,9 @@ public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Allows registering {@link RequestMatcher}s that should be mapped to a channel
|
||||||
|
* requirement.
|
||||||
|
*
|
||||||
* @deprecated no replacement planned
|
* @deprecated no replacement planned
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@@ -174,7 +177,7 @@ public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@link ChannelProcessor} instances to use in
|
* Sets the {@link ChannelProcessor} instances to use in
|
||||||
* {@link ChannelDecisionManagerImpl}
|
* {@link ChannelDecisionManagerImpl}.
|
||||||
* @param channelProcessors
|
* @param channelProcessors
|
||||||
* @return the {@link ChannelSecurityConfigurer} for further customizations
|
* @return the {@link ChannelSecurityConfigurer} for further customizations
|
||||||
*/
|
*/
|
||||||
@@ -185,7 +188,7 @@ public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@link RedirectStrategy} instances to use in
|
* Sets the {@link RedirectStrategy} instances to use in
|
||||||
* {@link RetryWithHttpEntryPoint} and {@link RetryWithHttpsEntryPoint}
|
* {@link RetryWithHttpEntryPoint} and {@link RetryWithHttpsEntryPoint}.
|
||||||
* @param redirectStrategy
|
* @param redirectStrategy
|
||||||
* @return the {@link ChannelSecurityConfigurer} for further customizations
|
* @return the {@link ChannelSecurityConfigurer} for further customizations
|
||||||
*/
|
*/
|
||||||
@@ -197,6 +200,9 @@ public final class ChannelSecurityConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Allows registering a channel requirement for the previously specified
|
||||||
|
* {@link RequestMatcher}s.
|
||||||
|
*
|
||||||
* @deprecated no replacement planned
|
* @deprecated no replacement planned
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|||||||
+2
-2
@@ -44,7 +44,7 @@ public class CorsConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractHt
|
|||||||
private CorsConfigurationSource configurationSource;
|
private CorsConfigurationSource configurationSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
* @see HttpSecurity#cors(Customizer)
|
* @see HttpSecurity#cors(Customizer)
|
||||||
*/
|
*/
|
||||||
@@ -88,7 +88,7 @@ public class CorsConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractHt
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This needs to be isolated into a separate class as Spring MVC is an optional
|
* This needs to be isolated into a separate class as Spring MVC is an optional
|
||||||
* dependency and will potentially cause ClassLoading issues
|
* dependency and will potentially cause ClassLoading issues.
|
||||||
* @param context
|
* @param context
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -103,7 +103,7 @@ public final class CsrfConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
private final ApplicationContext context;
|
private final ApplicationContext context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @see HttpSecurity#csrf(Customizer)
|
* @see HttpSecurity#csrf(Customizer)
|
||||||
*/
|
*/
|
||||||
public CsrfConfigurer(ApplicationContext context) {
|
public CsrfConfigurer(ApplicationContext context) {
|
||||||
|
|||||||
+6
-6
@@ -83,7 +83,7 @@ public final class ExceptionHandlingConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
private DelegatingMissingAuthorityAccessDeniedHandler.@Nullable Builder missingAuthoritiesHandlerBuilder;
|
private DelegatingMissingAuthorityAccessDeniedHandler.@Nullable Builder missingAuthoritiesHandlerBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @see HttpSecurity#exceptionHandling(Customizer)
|
* @see HttpSecurity#exceptionHandling(Customizer)
|
||||||
*/
|
*/
|
||||||
public ExceptionHandlingConfigurer() {
|
public ExceptionHandlingConfigurer() {
|
||||||
@@ -91,7 +91,7 @@ public final class ExceptionHandlingConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Shortcut to specify the {@link AccessDeniedHandler} to be used is a specific error
|
* Shortcut to specify the {@link AccessDeniedHandler} to be used is a specific error
|
||||||
* page
|
* page.
|
||||||
* @param accessDeniedUrl the URL to the access denied page (i.e. /errors/401)
|
* @param accessDeniedUrl the URL to the access denied page (i.e. /errors/401)
|
||||||
* @return the {@link ExceptionHandlingConfigurer} for further customization
|
* @return the {@link ExceptionHandlingConfigurer} for further customization
|
||||||
* @see AccessDeniedHandlerImpl
|
* @see AccessDeniedHandlerImpl
|
||||||
@@ -104,7 +104,7 @@ public final class ExceptionHandlingConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies the {@link AccessDeniedHandler} to be used
|
* Specifies the {@link AccessDeniedHandler} to be used.
|
||||||
* @param accessDeniedHandler the {@link AccessDeniedHandler} to be used
|
* @param accessDeniedHandler the {@link AccessDeniedHandler} to be used
|
||||||
* @return the {@link ExceptionHandlingConfigurer} for further customization
|
* @return the {@link ExceptionHandlingConfigurer} for further customization
|
||||||
*/
|
*/
|
||||||
@@ -213,7 +213,7 @@ public final class ExceptionHandlingConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets any explicitly configured {@link AuthenticationEntryPoint}
|
* Gets any explicitly configured {@link AuthenticationEntryPoint}.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AuthenticationEntryPoint getAuthenticationEntryPoint() {
|
AuthenticationEntryPoint getAuthenticationEntryPoint() {
|
||||||
@@ -242,7 +242,7 @@ public final class ExceptionHandlingConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the {@link AccessDeniedHandler} according to the rules specified by
|
* Gets the {@link AccessDeniedHandler} according to the rules specified by
|
||||||
* {@link #accessDeniedHandler(AccessDeniedHandler)}
|
* {@link #accessDeniedHandler(AccessDeniedHandler)}.
|
||||||
* @param http the {@link HttpSecurity} used to look up shared
|
* @param http the {@link HttpSecurity} used to look up shared
|
||||||
* {@link AccessDeniedHandler}
|
* {@link AccessDeniedHandler}
|
||||||
* @return the {@link AccessDeniedHandler} to use
|
* @return the {@link AccessDeniedHandler} to use
|
||||||
@@ -257,7 +257,7 @@ public final class ExceptionHandlingConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the {@link AuthenticationEntryPoint} according to the rules specified by
|
* Gets the {@link AuthenticationEntryPoint} according to the rules specified by
|
||||||
* {@link #authenticationEntryPoint(AuthenticationEntryPoint)}
|
* {@link #authenticationEntryPoint(AuthenticationEntryPoint)}.
|
||||||
* @param http the {@link HttpSecurity} used to look up shared
|
* @param http the {@link HttpSecurity} used to look up shared
|
||||||
* {@link AuthenticationEntryPoint}
|
* {@link AuthenticationEntryPoint}
|
||||||
* @return the {@link AuthenticationEntryPoint} to use
|
* @return the {@link AuthenticationEntryPoint} to use
|
||||||
|
|||||||
+3
-3
@@ -74,7 +74,7 @@ public final class FormLoginConfigurer<H extends HttpSecurityBuilder<H>> extends
|
|||||||
AbstractAuthenticationFilterConfigurer<H, FormLoginConfigurer<H>, UsernamePasswordAuthenticationFilter> {
|
AbstractAuthenticationFilterConfigurer<H, FormLoginConfigurer<H>, UsernamePasswordAuthenticationFilter> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @see HttpSecurity#formLogin(Customizer)
|
* @see HttpSecurity#formLogin(Customizer)
|
||||||
*/
|
*/
|
||||||
public FormLoginConfigurer() {
|
public FormLoginConfigurer() {
|
||||||
@@ -209,7 +209,7 @@ public final class FormLoginConfigurer<H extends HttpSecurityBuilder<H>> extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forward Authentication Failure Handler
|
* Forward Authentication Failure Handler.
|
||||||
* @param forwardUrl the target URL in case of failure
|
* @param forwardUrl the target URL in case of failure
|
||||||
* @return the {@link FormLoginConfigurer} for additional customization
|
* @return the {@link FormLoginConfigurer} for additional customization
|
||||||
*/
|
*/
|
||||||
@@ -219,7 +219,7 @@ public final class FormLoginConfigurer<H extends HttpSecurityBuilder<H>> extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forward Authentication Success Handler
|
* Forward Authentication Success Handler.
|
||||||
* @param forwardUrl the target URL in case of success
|
* @param forwardUrl the target URL in case of success
|
||||||
* @return the {@link FormLoginConfigurer} for additional customization
|
* @return the {@link FormLoginConfigurer} for additional customization
|
||||||
*/
|
*/
|
||||||
|
|||||||
+16
-14
@@ -109,7 +109,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
private final CrossOriginResourcePolicyConfig crossOriginResourcePolicy = new CrossOriginResourcePolicyConfig();
|
private final CrossOriginResourcePolicyConfig crossOriginResourcePolicy = new CrossOriginResourcePolicyConfig();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
* @see HttpSecurity#headers(Customizer)
|
* @see HttpSecurity#headers(Customizer)
|
||||||
*/
|
*/
|
||||||
@@ -117,7 +117,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a {@link HeaderWriter} instance
|
* Adds a {@link HeaderWriter} instance.
|
||||||
* @param headerWriter the {@link HeaderWriter} instance to add
|
* @param headerWriter the {@link HeaderWriter} instance to add
|
||||||
* @return the {@link HeadersConfigurer} for additional customizations
|
* @return the {@link HeadersConfigurer} for additional customizations
|
||||||
*/
|
*/
|
||||||
@@ -130,7 +130,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
/**
|
/**
|
||||||
* Configures the {@link XContentTypeOptionsHeaderWriter} which inserts the
|
* Configures the {@link XContentTypeOptionsHeaderWriter} which inserts the
|
||||||
* <a href= "https://msdn.microsoft.com/en-us/library/ie/gg622941(v=vs.85).aspx"
|
* <a href= "https://msdn.microsoft.com/en-us/library/ie/gg622941(v=vs.85).aspx"
|
||||||
* >X-Content-Type-Options</a>:
|
* >X-Content-Type-Options</a>:.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* X-Content-Type-Options: nosniff
|
* X-Content-Type-Options: nosniff
|
||||||
@@ -145,7 +145,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <strong>Note this is not comprehensive XSS protection!</strong>
|
* <strong>Note this is not comprehensive XSS protection!</strong>.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Allows customizing the {@link XXssProtectionHeaderWriter} which adds the <a href=
|
* Allows customizing the {@link XXssProtectionHeaderWriter} which adds the <a href=
|
||||||
@@ -276,7 +276,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the {@link HeaderWriter}
|
* Creates the {@link HeaderWriter}.
|
||||||
* @return the {@link HeaderWriter}
|
* @return the {@link HeaderWriter}
|
||||||
*/
|
*/
|
||||||
private HeaderWriterFilter createHeaderWriterFilter() {
|
private HeaderWriterFilter createHeaderWriterFilter() {
|
||||||
@@ -504,7 +504,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensures that Content Type Options is enabled
|
* Ensures that Content Type Options is enabled.
|
||||||
* @return the {@link ContentTypeOptionsConfig} for additional customization
|
* @return the {@link ContentTypeOptionsConfig} for additional customization
|
||||||
*/
|
*/
|
||||||
private ContentTypeOptionsConfig enable() {
|
private ContentTypeOptionsConfig enable() {
|
||||||
@@ -559,7 +559,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables X-XSS-Protection header (does not include it)
|
* Disables X-XSS-Protection header (does not include it).
|
||||||
* @return the {@link HeadersConfigurer} for additional configuration
|
* @return the {@link HeadersConfigurer} for additional configuration
|
||||||
*/
|
*/
|
||||||
public HeadersConfigurer<H> disable() {
|
public HeadersConfigurer<H> disable() {
|
||||||
@@ -589,7 +589,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables Cache Control
|
* Disables Cache Control.
|
||||||
* @return the {@link HeadersConfigurer} for additional configuration
|
* @return the {@link HeadersConfigurer} for additional configuration
|
||||||
*/
|
*/
|
||||||
public HeadersConfigurer<H> disable() {
|
public HeadersConfigurer<H> disable() {
|
||||||
@@ -686,7 +686,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables Strict Transport Security
|
* Disables Strict Transport Security.
|
||||||
* @return the {@link HeadersConfigurer} for additional configuration
|
* @return the {@link HeadersConfigurer} for additional configuration
|
||||||
*/
|
*/
|
||||||
public HeadersConfigurer<H> disable() {
|
public HeadersConfigurer<H> disable() {
|
||||||
@@ -695,7 +695,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensures that Strict-Transport-Security is enabled if it is not already
|
* Ensures that Strict-Transport-Security is enabled if it is not already.
|
||||||
* @return the {@link HstsConfig} for additional customization
|
* @return the {@link HstsConfig} for additional customization
|
||||||
*/
|
*/
|
||||||
private HstsConfig enable() {
|
private HstsConfig enable() {
|
||||||
@@ -761,6 +761,8 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Configures the HTTP Public Key Pinning (HPKP) header.
|
||||||
|
*
|
||||||
* @deprecated see <a href=
|
* @deprecated see <a href=
|
||||||
* "https://owasp.org/www-community/controls/Certificate_and_Public_Key_Pinning">Certificate
|
* "https://owasp.org/www-community/controls/Certificate_and_Public_Key_Pinning">Certificate
|
||||||
* and Public Key Pinning</a> for more context
|
* and Public Key Pinning</a> for more context
|
||||||
@@ -921,7 +923,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensures that Public-Key-Pins or Public-Key-Pins-Report-Only is enabled if it is
|
* Ensures that Public-Key-Pins or Public-Key-Pins-Report-Only is enabled if it is
|
||||||
* not already
|
* not already.
|
||||||
* @return the {@link HstsConfig} for additional customization
|
* @return the {@link HstsConfig} for additional customization
|
||||||
*/
|
*/
|
||||||
private HpkpConfig enable() {
|
private HpkpConfig enable() {
|
||||||
@@ -1029,7 +1031,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the policy to be used in the {@code Cross-Origin-Opener-Policy} header
|
* Sets the policy to be used in the {@code Cross-Origin-Opener-Policy} header.
|
||||||
* @param openerPolicy a {@code Cross-Origin-Opener-Policy}
|
* @param openerPolicy a {@code Cross-Origin-Opener-Policy}
|
||||||
* @return the {@link CrossOriginOpenerPolicyConfig} for additional configuration
|
* @return the {@link CrossOriginOpenerPolicyConfig} for additional configuration
|
||||||
* @throws IllegalArgumentException if openerPolicy is null
|
* @throws IllegalArgumentException if openerPolicy is null
|
||||||
@@ -1050,7 +1052,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the policy to be used in the {@code Cross-Origin-Embedder-Policy} header
|
* Sets the policy to be used in the {@code Cross-Origin-Embedder-Policy} header.
|
||||||
* @param embedderPolicy a {@code Cross-Origin-Embedder-Policy}
|
* @param embedderPolicy a {@code Cross-Origin-Embedder-Policy}
|
||||||
* @return the {@link CrossOriginEmbedderPolicyConfig} for additional
|
* @return the {@link CrossOriginEmbedderPolicyConfig} for additional
|
||||||
* configuration
|
* configuration
|
||||||
@@ -1072,7 +1074,7 @@ public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the policy to be used in the {@code Cross-Origin-Resource-Policy} header
|
* Sets the policy to be used in the {@code Cross-Origin-Resource-Policy} header.
|
||||||
* @param resourcePolicy a {@code Cross-Origin-Resource-Policy}
|
* @param resourcePolicy a {@code Cross-Origin-Resource-Policy}
|
||||||
* @return the {@link CrossOriginResourcePolicyConfig} for additional
|
* @return the {@link CrossOriginResourcePolicyConfig} for additional
|
||||||
* configuration
|
* configuration
|
||||||
|
|||||||
+1
-1
@@ -98,7 +98,7 @@ public final class HttpBasicConfigurer<B extends HttpSecurityBuilder<B>>
|
|||||||
private SecurityContextRepository securityContextRepository;
|
private SecurityContextRepository securityContextRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @see HttpSecurity#httpBasic(Customizer)
|
* @see HttpSecurity#httpBasic(Customizer)
|
||||||
*/
|
*/
|
||||||
public HttpBasicConfigurer() {
|
public HttpBasicConfigurer() {
|
||||||
|
|||||||
+2
-2
@@ -78,7 +78,7 @@ public final class JeeConfigurer<H extends HttpSecurityBuilder<H>> extends Abstr
|
|||||||
private Set<String> mappableRoles = new HashSet<>();
|
private Set<String> mappableRoles = new HashSet<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance
|
* Creates a new instance.
|
||||||
* @see HttpSecurity#jee(Customizer)
|
* @see HttpSecurity#jee(Customizer)
|
||||||
*/
|
*/
|
||||||
public JeeConfigurer() {
|
public JeeConfigurer() {
|
||||||
@@ -185,7 +185,7 @@ public final class JeeConfigurer<H extends HttpSecurityBuilder<H>> extends Abstr
|
|||||||
* Populates a {@link PreAuthenticatedAuthenticationProvider} into
|
* Populates a {@link PreAuthenticatedAuthenticationProvider} into
|
||||||
* {@link HttpSecurity#authenticationProvider(org.springframework.security.authentication.AuthenticationProvider)}
|
* {@link HttpSecurity#authenticationProvider(org.springframework.security.authentication.AuthenticationProvider)}
|
||||||
* and a {@link Http403ForbiddenEntryPoint} into
|
* and a {@link Http403ForbiddenEntryPoint} into
|
||||||
* {@link HttpSecurityBuilder#setSharedObject(Class, Object)}
|
* {@link HttpSecurityBuilder#setSharedObject(Class, Object)}.
|
||||||
*
|
*
|
||||||
* @see SecurityConfigurer#init(org.springframework.security.config.annotation.SecurityBuilder)
|
* @see SecurityConfigurer#init(org.springframework.security.config.annotation.SecurityBuilder)
|
||||||
*/
|
*/
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user