Class RemoteUserAuthModule

  • All Implemented Interfaces:
    AuthModule

    public class RemoteUserAuthModule
    extends Object
    implements AuthModule
    AuthModule that identifies users based on an HTTP header property. This can be used when Yamcs is well-protected from spoofing attempts and authentication is done on a reverse proxy, like Apache or Nginx.
    • Constructor Detail

      • RemoteUserAuthModule

        public RemoteUserAuthModule()
    • Method Detail

      • getSpec

        public Spec getSpec()
        Description copied from interface: AuthModule
        Returns the valid configuration of the input args of this AuthModule.
        Specified by:
        getSpec in interface AuthModule
        Returns:
        the argument specification.
      • getHeader

        public String getHeader()
      • init

        public void init​(YConfiguration args)
                  throws InitException
        Description copied from interface: AuthModule
        Initialize this AuthModule.
        Specified by:
        init in interface AuthModule
        Parameters:
        args - The configured arguments for this AuthModule. If AuthModule.getSpec() is implemented then this contains the arguments after being validated (including any defaults).
        Throws:
        InitException - When something goes wrong during the execution of this method.
      • verifyValidity

        public boolean verifyValidity​(AuthenticationInfo authenticationInfo)
        Description copied from interface: AuthModule
        Verify if previously generated authentication info is (still) valid. For example, if the authentication info references an externally issued expiring ticket, this can be validated here.

        This method is called very frequently, so implementations must take care to limit external requests.

        Specified by:
        verifyValidity in interface AuthModule
        Parameters:
        authenticationInfo - information relevant to the authentication process
        Returns:
        true if the authentication info is valid, false otherwise