Skip to content

Commit

Permalink
Fix for OpenSAML 4.3
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Pleskach <[email protected]>
  • Loading branch information
willyborankin committed Nov 3, 2023
1 parent 5de9686 commit 329f4de
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
1 change: 0 additions & 1 deletion plugin-security.policy
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ grant {

//SAML policy
permission java.util.PropertyPermission "*", "read,write";
permission org.opensearch.secure_sm.ThreadPermission "modifyArbitraryThread";
};

grant codeBase "${codebase.netty-common}" {
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/net/shibboleth/shared/primitive/CleanerSupport.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package net.shibboleth.shared.primitive;

import java.lang.ref.Cleaner;
import javax.annotation.Nonnull;

import org.opensearch.common.util.concurrent.OpenSearchExecutors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class CleanerSupport {
@Nonnull
private static final Logger LOG = LoggerFactory.getLogger(CleanerSupport.class);

private CleanerSupport() {}

@Nonnull
public static Cleaner getInstance(@Nonnull final Class<?> requester) {
LOG.debug("Creating new java.lang.ref.Cleaner instance requested by class: {}", requester.getName());
return Cleaner.create(OpenSearchExecutors.daemonThreadFactory("cleaners"));
}
}

0 comments on commit 329f4de

Please sign in to comment.