@Override protected String getNegotiatedProperty(String name) { return (String) server.getNegotiatedProperty(name); }
public Object getNegotiatedProperty(final String propName) { return delegate.getNegotiatedProperty(propName); }
public String getNegotiatedQop() { return (String) saslServer.getNegotiatedProperty(Sasl.QOP); }
/** * Constructs a SASLInputStream from an InputStream and a SaslServer <br> * Note: if the specified InputStream or SaslServer is null, a * NullPointerException may be thrown later when they are used. * * @param inStream * the InputStream to be processed * @param saslServer * an initialized SaslServer object */ public SaslInputStream(InputStream inStream, SaslServer saslServer) { this.inStream = new DataInputStream(inStream); this.saslServer = saslServer; this.saslClient = null; String qop = (String) saslServer.getNegotiatedProperty(Sasl.QOP); this.useWrap = qop != null && !"auth".equalsIgnoreCase(qop); }
@Override public boolean needsWrapping() { if (server.isComplete()) { String qop = (String) server.getNegotiatedProperty(Sasl.QOP); return (qop != null && (qop.equalsIgnoreCase("auth-int") || qop.equalsIgnoreCase("auth-conf"))); } else { return false; } }
/** * Constructs a SASLOutputStream from an OutputStream and a SaslServer <br> * Note: if the specified OutputStream or SaslServer is null, a * NullPointerException may be thrown later when they are used. * * @param outStream * the OutputStream to be processed * @param saslServer * an initialized SaslServer object */ public SaslOutputStream(OutputStream outStream, SaslServer saslServer) { this.saslServer = saslServer; this.saslClient = null; String qop = (String) saslServer.getNegotiatedProperty(Sasl.QOP); this.useWrap = qop != null && !"auth".equalsIgnoreCase(qop); if (useWrap) { this.outStream = new BufferedOutputStream(outStream, 64*1024); } else { this.outStream = outStream; } }
public Object getNegotiatedProperty(String propName) { if (client != null) return client.getNegotiatedProperty(propName); else return server.getNegotiatedProperty(propName); }
authenticationEndNanos = time.nanoseconds(); Long credentialExpirationMs = (Long) saslServer .getNegotiatedProperty(SaslInternalConfigs.CREDENTIAL_LIFETIME_MS_SASL_NEGOTIATED_PROPERTY_KEY); Long connectionsMaxReauthMs = connectionsMaxReauthMsByMechanism.get(saslMechanism); if (credentialExpirationMs != null || connectionsMaxReauthMs != null) {
@Override public KafkaPrincipal principal() { SaslAuthenticationContext context = new SaslAuthenticationContext(saslServer, securityProtocol, clientAddress(), listenerName.value()); KafkaPrincipal principal = principalBuilder.build(context); if (ScramMechanism.isScram(saslMechanism) && Boolean.parseBoolean((String) saslServer.getNegotiatedProperty(ScramLoginModule.TOKEN_AUTH_CONFIG))) { principal.tokenAuthenticated(true); } return principal; }
public SecurityIdentity getLocalIdentity(final int id) { if (id == 1) { final SaslAuthenticationFactory authenticationFactory = this.authenticationFactory; return authenticationFactory == null ? null : authenticationFactory.getSecurityDomain().getAnonymousSecurityIdentity(); } else if (id == 0) { return getLocalIdentity(); } final Auth auth = authMap.get(id); return auth != null ? (SecurityIdentity) auth.getSaslServer().getNegotiatedProperty(WildFlySasl.SECURITY_IDENTITY) : null; }
if (LOG.isDebugEnabled()) { LOG.debug("SASL server context established. Negotiated QoP is " + saslServer.getNegotiatedProperty(Sasl.QOP)); String qop = (String) saslServer.getNegotiatedProperty(Sasl.QOP);
server.tracef("Server sending authentication complete"); connectionProviderContext.accept(connectionContext -> { final Object qop = saslServer.getNegotiatedProperty(Sasl.QOP); if (!isInitial && ("auth-int".equals(qop) || "auth-conf".equals(qop))) { connection.setSaslWrapper(SaslWrapper.create(saslServer)); connectionContext, connection, maxInboundChannels, maxOutboundChannels, AnonymousPrincipal.getInstance(), remoteEndpointName, behavior, authCap, offeredMechanisms, peerName, serverName); connection.getRemoteConnectionProvider().addConnectionHandler(connectionHandler); final SecurityIdentity identity = (SecurityIdentity) saslServer.getNegotiatedProperty(WildFlySasl.SECURITY_IDENTITY); connection.setIdentity(identity == null ? saslAuthenticationFactory.getSecurityDomain().getAnonymousSecurityIdentity() : identity); connection.setReadListener(new RemoteReadListener(connectionHandler, connection), false);
public Object getNegotiatedProperty(String propName) { if (saslClient != null) return saslClient.getNegotiatedProperty(propName); else return saslServer.getNegotiatedProperty(propName); } }
public SaslInputStream(SaslServer server, InputStream source) throws IOException { super(); this.server = server; maxRawSendSize = Integer.parseInt( (String) server.getNegotiatedProperty(Sasl.RAW_SEND_SIZE)); client = null; this.source = source; }
@Override public boolean needsWrapping() { if (server.isComplete()) { String qop = (String) server.getNegotiatedProperty(Sasl.QOP); return (qop != null && (qop.equalsIgnoreCase("auth-int") || qop.equalsIgnoreCase("auth-conf"))); } else { return false; } }
@Override public boolean needsWrapping() { if (server.isComplete()) { String qop = (String) server.getNegotiatedProperty(Sasl.QOP); return (qop != null && (qop.equalsIgnoreCase("auth-int") || qop.equalsIgnoreCase("auth-conf"))); } else { return false; } }
public Object getNegotiatedProperty(String propName) { if (saslClient != null) return saslClient.getNegotiatedProperty(propName); else return saslServer.getNegotiatedProperty(propName); } }
public Object getNegotiatedProperty(String propName) { if (saslClient != null) return saslClient.getNegotiatedProperty(propName); else return saslServer.getNegotiatedProperty(propName); } }
public Object getNegotiatedProperty(String propName) { if (saslClient != null) return saslClient.getNegotiatedProperty(propName); else return saslServer.getNegotiatedProperty(propName); } }
public SecurityIdentity getLocalIdentity(final int id) { if (id == 1) { final SaslAuthenticationFactory authenticationFactory = this.authenticationFactory; return authenticationFactory == null ? null : authenticationFactory.getSecurityDomain().getAnonymousSecurityIdentity(); } else if (id == 0) { return getLocalIdentity(); } final Auth auth = authMap.get(id); return auth != null ? (SecurityIdentity) auth.getSaslServer().getNegotiatedProperty(WildFlySasl.SECURITY_IDENTITY) : null; }