Decode and encode SAP SSO2 logon tickets
| Field | Value | Hex |
|---|
MYSAPSSO2 is an SAP SSO2 logon ticket — a cookie-based Single Sign-On token used by SAP systems.
When a user authenticates to an SAP system, the server issues a signed ticket stored as the
MYSAPSSO2 browser cookie. Other SAP systems that trust the issuer's certificate can
accept the ticket for passwordless login.
The token is a base64-encoded binary blob with this layout:
| Offset | Content |
|---|---|
| 0 | Version byte (usually 0x02) |
| 1–4 | Codepage — 4 ASCII bytes (e.g. 4103) |
| 5…n | TLV (Tag-Length-Value) fields — see table below |
| n+1 | 0xFF end-of-fields marker |
| n+2…n+3 | Signature length — 2-byte big-endian uint16 |
| n+4… | PKCS#7 / CMS signature block (BER/DER encoded) |
Common TLV fields:
| ID | Name | Encoding |
|---|---|---|
| 0x01 | User | UTF-16LE text |
| 0x02 | System ID (SysId) | UTF-16LE text |
| 0x03 | Client | UTF-16LE text |
| 0x04 | Validity (expiry) | UTF-16LE YYYYMMDDHHmmss |
| 0x05 | Signature Flags | Raw bytes (hex) |
| 0x06 | Recipient Info | UTF-16LE text |
| 0x09 | Short Info | UTF-16LE text |
MYSAPSSO2) or from an HTTP Authorization header.YYYYMMDDHHmmss.