Class EncodingTicketService

  • All Implemented Interfaces:
    TicketService

    public class EncodingTicketService
    extends AbstractTicketService
    Ticket service that uses two different strategies for ticket persistence:
    1. Service tickets, proxy tickets, and root proxy-granting tickets are persisted by serializing ticket data and encrypting it into the opaque part of the ticket ID using a DataSealer.
    2. Chained proxy-granting tickets are persisted using a StorageService.

    NOTE: The service tickets, proxy tickets, and root proxy-granting tickets produced by this component do not support one-time use. More precisely, removeServiceTicket(String) and removeProxyTicket(String) simply return a decoded ticket and do not invalidate the ticket in any way. Since there is no backing store for those types of tickets, they can be reused until one of the following conditions is met:

    1. The value of Ticket.getExpirationInstant() is exceeded.
    2. The DataSealer key used to encrypt data is revoked.
    Since:
    3.3.0
    • Field Detail

      • SERVICE_TICKET_PREFIX

        public static final String SERVICE_TICKET_PREFIX
        Default service ticket prefix.
        See Also:
        Constant Field Values
      • PROXY_GRANTING_TICKET_PREFIX

        public static final String PROXY_GRANTING_TICKET_PREFIX
        Default proxy granting ticket prefix.
        See Also:
        Constant Field Values
      • NOT_USED

        private static final String NOT_USED
        Non-null marker value for unused ServiceTicket#id field and storage context name.
        See Also:
        Constant Field Values
      • log

        private final org.slf4j.Logger log
        Class logger.
      • dataSealer

        @Nonnull
        private final DataSealer dataSealer
        Data sealer that handles encryption of serialized service ticket data.
      • serviceTicketPrefix

        @NotEmpty
        private String serviceTicketPrefix
        Service ticket prefix.
      • proxyTicketPrefix

        @NotEmpty
        private String proxyTicketPrefix
        Proxy ticket prefix.
      • proxyGrantingTicketPrefix

        @NotEmpty
        private String proxyGrantingTicketPrefix
        Proxy granting ticket prefix.
    • Constructor Detail