Class Principals

java.lang.Object
io.strimzi.kafka.oauth.services.Principals

public class Principals extends Object
An in-memory cache of 'sessions' and their associated principals. Used to transfer the principal information between SASL authentication layer and PrincipalBuilder layer.
  • Constructor Details

    • Principals

      public Principals()
  • Method Details

    • putPrincipal

      public void putPrincipal(SaslServer srv, org.apache.kafka.common.security.auth.KafkaPrincipal principal)
      Put a new principal into the cache
      Parameters:
      srv - a SaslServer instance
      principal - a KafkaPrincipal
    • getPrincipal

      public org.apache.kafka.common.security.auth.KafkaPrincipal getPrincipal(SaslServer srv)
      Get the new principal from the cache
      Parameters:
      srv - a SaslServer principal
      Returns:
      an associated KafkaPrincipal