Documentation ¶
Index ¶
Constants ¶
View Source
const ( RsaKeyBits = 2048 CertFileSuffix = ".cert" KeyFileSuffix = ".key" )
View Source
const ( KeyBits = 2048 MaxValidForSeconds = 7 * 24 * 3600 )
Variables ¶
This section is empty.
Functions ¶
func GenerateSubjectKeyId ¶
GenerateSubjectKeyId generates SubjectKeyId used in Certificate Id is 160-bit SHA-1 hash of the value of the BIT STRING subjectPublicKey
func RandomSerial ¶
Types ¶
type Credentials ¶
type EncodedUserKeyPair ¶
type KubeIssuer ¶
type KubeIssuer struct { CAKeypair *tls.Certificate CACert *x509.Certificate CACertEncoded string Clock clockwork.Clock }
func NewKubeIssuer ¶
func NewKubeIssuer(certPem, keyPem []byte) (*KubeIssuer, error)
func (*KubeIssuer) GenerateUserKeyPair ¶
func (issuer *KubeIssuer) GenerateUserKeyPair(cn string, orgs []string, validForSeconds int) (*UserKeyPair, error)
Generate a signed certificate for the specified CN and OrganizationalUnits. These map to the username and roles/groups in kubernetes.
type UserKeyPair ¶
func (*UserKeyPair) Encode ¶
func (kp *UserKeyPair) Encode() *EncodedUserKeyPair
Click to show internal directories.
Click to hide internal directories.