Skip to content

Commit

Permalink
PAYARA-3658 TransportGuarantee changed to CONFIDENTIAL
Browse files Browse the repository at this point in the history
  • Loading branch information
jGauravGupta committed Sep 23, 2019
1 parent 40d140c commit dc11fa4
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -46,7 +46,7 @@
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import javax.servlet.ServletSecurityElement;
import static javax.servlet.annotation.ServletSecurity.TransportGuarantee.NONE;
import static javax.servlet.annotation.ServletSecurity.TransportGuarantee.CONFIDENTIAL;
import org.glassfish.internal.api.Globals;
import java.util.logging.Logger;

Expand Down Expand Up @@ -75,7 +75,7 @@ public void onStartup(Set<Class<?>> set, ServletContext ctx) throws ServletExcep
String[] roles = configuration.getRoles().split(",");
ServletRegistration.Dynamic reg = (ServletRegistration.Dynamic) ctx.getServletRegistration("fish.payara.ejb.http.endpoint.EjbOverHttpApplication");
if (reg != null) {
reg.setServletSecurity(new ServletSecurityElement(new HttpConstraintElement(NONE, roles)));
reg.setServletSecurity(new ServletSecurityElement(new HttpConstraintElement(CONFIDENTIAL, roles)));
} else {
LOGGER.warning("ejb-invoker endpoint not initialized");
}
Expand Down

0 comments on commit dc11fa4

Please sign in to comment.