Package utils contains a variety of small utility functions used by other tokenserver packages.
DumpPEM transforms block to pem-encoding.
Reverse of ParsePEM.
ParsePEM takes pem-encoded block and decodes it, checking the header.
SerializeSN converts a certificate serial number to a byte blob.
ServiceVersion returns a string that identifies the app and the version.
It is put in some server responses. The function extracts this information from the given signer.
This function almost never returns errors. It can return an error only when called for the first time during the process lifetime. It gets cached after first successful return.
TokenFingerprint returns first 16 bytes of SHA256 of the token, as hex.
Token fingerprints can be used to identify tokens without parsing them.
ValidateTags returns an error if some tags are malformed.
Tags are "key:value" pairs that can be passed with some RPCs. They end up inside the tokens and/or BigQuery logs.
ZlibCompress zips a blob using zlib.
ZlibDecompress unzips a blob using zlib.
|identityset||Package identityset implements a set-like structure for identity.Identity.|
|policy||Package policy contains implementation of Policy parsing and querying.|
|revocation||Package revocation contains utilities for implementing token revocation.|
|shards||Package shards provides a low level support for implementing sharded set of byte blobs.|
|tokensigning||Package tokensigning implements utilities for RSA-signing of proto messages.|