[java-shib-attribute] branch main updated: Add missing license headers.
Scott Cantor
cantor.2 at osu.edu
Tue Apr 22 14:52:01 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-shib-attribute.
View the commit online:
http://git.shibboleth.net/view/?p=java-shib-attribute.git;a=commit;h=89a55acb56c2d95b8490fd8266ac64d42ec3ca71
The following commit(s) were added to refs/heads/main by this push:
new 89a55acb5 Add missing license headers.
89a55acb5 is described below
commit 89a55acb56c2d95b8490fd8266ac64d42ec3ca71
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Apr 22 10:51:58 2025 -0400
Add missing license headers.
---
.../impl/AbstractProtocolSupportPolicyRule.java | 92 +++++++++++++---------
.../saml/impl/IssuerProtocolSupportPolicyRule.java | 31 ++++++--
.../ProxiedRequesterProtocolSupportPolicyRule.java | 31 ++++++--
.../impl/RequesterProtocolSupportPolicyRule.java | 31 ++++++--
.../impl/IssuerProtocolSupportParser.java | 18 ++++-
.../ProxiedRequesterProtocolSupportParser.java | 18 ++++-
.../impl/RequesterProtocolSupportParser.java | 18 ++++-
7 files changed, 174 insertions(+), 65 deletions(-)
diff --git a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractProtocolSupportPolicyRule.java b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractProtocolSupportPolicyRule.java
index b1eae53a6..56c4f7202 100644
--- a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractProtocolSupportPolicyRule.java
+++ b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractProtocolSupportPolicyRule.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package net.shibboleth.idp.attribute.filter.policyrule.saml.impl;
import javax.annotation.Nonnull;
@@ -23,54 +37,56 @@ import net.shibboleth.shared.primitive.LoggerFactory;
*/
public abstract class AbstractProtocolSupportPolicyRule extends AbstractPolicyRule {
- @Nonnull
- private final Logger log = LoggerFactory.getLogger(AbstractProtocolSupportPolicyRule.class);
+ /** Class logger. */
+ @Nonnull private final Logger log = LoggerFactory.getLogger(AbstractProtocolSupportPolicyRule.class);
- /** What we are checking against. */
- @NonnullAfterInit private String protocol;
+ /** What we are checking against. */
+ @NonnullAfterInit private String protocol;
- @Override
- protected void doInitialize() throws ComponentInitializationException {
- super.doInitialize();
- if (protocol == null) {
- log.error("{} protocol not set", getLogPrefix());
- throw new ComponentInitializationException("Protocol not set in ProtocolSupportPolicyRule");
- }
- }
+ /** {@inheritDoc} */
+ @Override
+ protected void doInitialize() throws ComponentInitializationException {
+ super.doInitialize();
+ if (protocol == null) {
+ log.error("{} protocol not set", getLogPrefix());
+ throw new ComponentInitializationException("Protocol not set in ProtocolSupportPolicyRule");
+ }
+ }
- /** Get {@link #protocol}.
- * @return {@link #protocol}
- */
- @Nonnull public String getProtocol() {
- assert protocol != null;
- return protocol;
- }
+ /** Get {@link #protocol}.
+ * @return {@link #protocol}
+ */
+ @Nonnull public String getProtocol() {
+ assert protocol != null;
+ return protocol;
+ }
- /** Set {@link #protocol}.
- * @param what thing to set.
- */
- public void setProtocol(@Nonnull String what) {
- protocol = Constraint.isNotNull(what, "Supplier protocol was null");
- }
+ /** Set {@link #protocol}.
+ * @param what thing to set.
+ */
+ public void setProtocol(@Nonnull final String what) {
+ protocol = Constraint.isNotNull(what, "Supplier protocol was null");
+ }
- @Override
- public Tristate matches(@Nonnull final AttributeFilterContext filterContext) {
- final RoleDescriptor role = getRoleDescriptor(filterContext);
- if (role == null) {
- return Tristate.FAIL;
- }
- if (role.getSupportedProtocols().contains(protocol)) {
- return Tristate.TRUE;
- }
- return Tristate.FALSE;
- }
+ /** {@inheritDoc} */
+ @Nonnull public Tristate matches(@Nonnull final AttributeFilterContext filterContext) {
+ final RoleDescriptor role = getRoleDescriptor(filterContext);
+ if (role == null) {
+ return Tristate.FAIL;
+ }
+ if (role.getSupportedProtocols().contains(protocol)) {
+ return Tristate.TRUE;
+ }
+ return Tristate.FALSE;
+ }
/**
- * Gets the {@link RoleDescriptor} we are interested in
+ * Gets the {@link RoleDescriptor} we are interested in.
*
* @param filterContext current filter request context
*
* @return the RoleDescriptr
*/
- @Nullable protected abstract RoleDescriptor getRoleDescriptor(@Nonnull final AttributeFilterContext filterContext);
+ @Nullable protected abstract RoleDescriptor getRoleDescriptor(@Nonnull final AttributeFilterContext filterContext);
+
}
diff --git a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/IssuerProtocolSupportPolicyRule.java b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/IssuerProtocolSupportPolicyRule.java
index d07cde919..e8d41f6d8 100644
--- a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/IssuerProtocolSupportPolicyRule.java
+++ b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/IssuerProtocolSupportPolicyRule.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package net.shibboleth.idp.attribute.filter.policyrule.saml.impl;
import javax.annotation.Nonnull;
@@ -13,13 +27,14 @@ import net.shibboleth.idp.attribute.filter.context.AttributeFilterContext;
*/
public class IssuerProtocolSupportPolicyRule extends AbstractProtocolSupportPolicyRule {
- @Override
- @Nullable protected RoleDescriptor getRoleDescriptor(@Nonnull final AttributeFilterContext filterContext) {
- final SAMLMetadataContext context = filterContext.getIssuerMetadataContext();
- if (context == null) {
- return null;
- }
- return context.getRoleDescriptor();
- }
+ /** {@inheritDoc} */
+ @Override
+ @Nullable protected RoleDescriptor getRoleDescriptor(@Nonnull final AttributeFilterContext filterContext) {
+ final SAMLMetadataContext context = filterContext.getIssuerMetadataContext();
+ if (context == null) {
+ return null;
+ }
+ return context.getRoleDescriptor();
+ }
}
diff --git a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/ProxiedRequesterProtocolSupportPolicyRule.java b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/ProxiedRequesterProtocolSupportPolicyRule.java
index 23cc55190..872c558c5 100644
--- a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/ProxiedRequesterProtocolSupportPolicyRule.java
+++ b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/ProxiedRequesterProtocolSupportPolicyRule.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package net.shibboleth.idp.attribute.filter.policyrule.saml.impl;
import javax.annotation.Nonnull;
@@ -13,13 +27,14 @@ import net.shibboleth.idp.attribute.filter.context.AttributeFilterContext;
*/
public class ProxiedRequesterProtocolSupportPolicyRule extends AbstractProtocolSupportPolicyRule {
- @Override
- @Nullable protected RoleDescriptor getRoleDescriptor(@Nonnull final AttributeFilterContext filterContext) {
- final SAMLMetadataContext context = filterContext.getProxiedRequesterMetadataContext();
- if (context == null) {
- return null;
- }
- return context.getRoleDescriptor();
- }
+ /** {@inheritDoc} */
+ @Override
+ @Nullable protected RoleDescriptor getRoleDescriptor(@Nonnull final AttributeFilterContext filterContext) {
+ final SAMLMetadataContext context = filterContext.getProxiedRequesterMetadataContext();
+ if (context == null) {
+ return null;
+ }
+ return context.getRoleDescriptor();
+ }
}
diff --git a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/RequesterProtocolSupportPolicyRule.java b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/RequesterProtocolSupportPolicyRule.java
index eefabfdf0..9bdb38b5d 100644
--- a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/RequesterProtocolSupportPolicyRule.java
+++ b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/RequesterProtocolSupportPolicyRule.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package net.shibboleth.idp.attribute.filter.policyrule.saml.impl;
import javax.annotation.Nonnull;
@@ -13,13 +27,14 @@ import net.shibboleth.idp.attribute.filter.context.AttributeFilterContext;
*/
public class RequesterProtocolSupportPolicyRule extends AbstractProtocolSupportPolicyRule {
- @Override
- @Nullable protected RoleDescriptor getRoleDescriptor(@Nonnull final AttributeFilterContext filterContext) {
- final SAMLMetadataContext context = filterContext.getRequesterMetadataContext();
- if (context == null) {
- return null;
- }
- return context.getRoleDescriptor();
- }
+ /** {@inheritDoc} */
+ @Override
+ @Nullable protected RoleDescriptor getRoleDescriptor(@Nonnull final AttributeFilterContext filterContext) {
+ final SAMLMetadataContext context = filterContext.getRequesterMetadataContext();
+ if (context == null) {
+ return null;
+ }
+ return context.getRoleDescriptor();
+ }
}
diff --git a/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/IssuerProtocolSupportParser.java b/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/IssuerProtocolSupportParser.java
index d95951a5c..99c3a7e6b 100644
--- a/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/IssuerProtocolSupportParser.java
+++ b/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/IssuerProtocolSupportParser.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package net.shibboleth.idp.attribute.filter.spring.policyrule.impl;
import javax.annotation.Nonnull;
@@ -15,8 +29,10 @@ public class IssuerProtocolSupportParser extends AbstractProtocolSupportParser {
@Nonnull public static final QName SCHEMA_TYPE =
new QName(BaseFilterParser.NAMESPACE, "IssuerProtocolSupport");
+ /** {@inheritDoc} */
@Override
- protected Class<?> getNativeBeanClass() {
+ @Nonnull protected Class<?> getNativeBeanClass() {
return IssuerProtocolSupportPolicyRule.class;
}
+
}
diff --git a/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/ProxiedRequesterProtocolSupportParser.java b/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/ProxiedRequesterProtocolSupportParser.java
index 472ecc95c..cfd1a86f6 100644
--- a/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/ProxiedRequesterProtocolSupportParser.java
+++ b/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/ProxiedRequesterProtocolSupportParser.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package net.shibboleth.idp.attribute.filter.spring.policyrule.impl;
import javax.annotation.Nonnull;
@@ -15,8 +29,10 @@ public class ProxiedRequesterProtocolSupportParser extends AbstractProtocolSuppo
@Nonnull public static final QName SCHEMA_TYPE =
new QName(BaseFilterParser.NAMESPACE, "ProxiedRequesterProtocolSupport");
+ /** {@inheritDoc} */
@Override
- protected Class<?> getNativeBeanClass() {
+ @Nonnull protected Class<?> getNativeBeanClass() {
return ProxiedRequesterProtocolSupportPolicyRule.class;
}
+
}
diff --git a/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/RequesterProtocolSupportParser.java b/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/RequesterProtocolSupportParser.java
index 4f5624969..5a8784d10 100644
--- a/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/RequesterProtocolSupportParser.java
+++ b/shib-attribute-filter-spring/src/main/java/net/shibboleth/idp/attribute/filter/spring/policyrule/impl/RequesterProtocolSupportParser.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package net.shibboleth.idp.attribute.filter.spring.policyrule.impl;
import javax.annotation.Nonnull;
@@ -15,8 +29,10 @@ public class RequesterProtocolSupportParser extends AbstractProtocolSupportParse
@Nonnull public static final QName SCHEMA_TYPE =
new QName(BaseFilterParser.NAMESPACE, "ProtocolSupport");
+ /** {@inheritDoc} */
@Override
- protected Class<?> getNativeBeanClass() {
+ @Nonnull protected Class<?> getNativeBeanClass() {
return RequesterProtocolSupportPolicyRule.class;
}
+
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list