Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
SHIBUI-799: fix nameid filter init error during effective reload
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v2.0.0-BETA-RC5
- v2.0.0-BETA-R2
- v2.0.0-BETA-R1
- v1.18.0
- v1.17.4
- v1.17.3
- v1.17.2
- v1.17.1
- v1.17.0
- v1.16.0
- v1.15.2
- v1.15.1
- v1.15.0
- v1.14.0
- v1.13.3
- v1.13.2
- v1.13.1
- v1.13.0
- v1.12.0
- v1.11.1
- v1.11.0
- v1.10.3
- v1.10.2
- v1.10.1
- v1.10.0
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.1
- v1.8.0
- v1.7.0
- v1.7.0-RC2
- v1.7.0-RC1
- v1.6.4
- v1.6.4-SNAPSHOT
- v1.6.0
- v1.6.0-RC1
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-BETA-RC5
- 2.0.0-BETA-R2
- 2.0.0-BETA-R1
- 1.18.0
- 1.17.4
- 1.17.3
- 1.17.2
- 1.17.1
- 1.17.0
- 1.16.0
- 1.15.2
- 1.15.1
- 1.15.0
- 1.14.0
- 1.13.3
- 1.13.2
- 1.13.1
- 1.13.0
- 1.12.0
- 1.11.1
- 1.11.0
- 1.10.3
- 1.10.2
- 1.10.1
- 1.10.0
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.1
- 1.8.0
- 1.7.0
- 1.7.0-RC2
- 1.7.0-RC1
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.6.0-RC1
- 1.5.3
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...nternet2/tier/shibboleth/admin/ui/domain/filters/opensaml/OpenSamlNameIdFormatFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.domain.filters.opensaml; | ||
|
||
import org.opensaml.core.xml.XMLObject; | ||
import org.opensaml.saml.metadata.resolver.filter.FilterException; | ||
import org.opensaml.saml.metadata.resolver.filter.impl.NameIDFormatFilter; | ||
import org.opensaml.saml.saml2.metadata.EntitiesDescriptor; | ||
import org.opensaml.saml.saml2.metadata.EntityDescriptor; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* Extension to open saml type for workaround forced component initialization check. We need to override <i>filter</i> | ||
* method to skip this check as we use re-filtering in Shib UI context just to reload effective metadata. | ||
* | ||
* @author Dmitriy Kopylenko | ||
*/ | ||
public class OpenSamlNameIdFormatFilter extends NameIDFormatFilter { | ||
|
||
@Nullable | ||
@Override | ||
public XMLObject filter(@Nullable XMLObject metadata) throws FilterException { | ||
if (metadata == null) { | ||
return null; | ||
} | ||
|
||
if (metadata instanceof EntitiesDescriptor) { | ||
filterEntitiesDescriptor((EntitiesDescriptor) metadata); | ||
} else { | ||
filterEntityDescriptor((EntityDescriptor) metadata); | ||
} | ||
|
||
return metadata; | ||
} | ||
} |