- IJwtAuthentication
- ISignatureHandler
- ISignatureProvider
- ITimestampService
- IUserHandler
- IVotingKeyStore
- PkiStatus
FreieWahl.Security.Authentication
Interface for checking JWT authorization tokens, this is essential for the authentication process.
checks if a given jwt token is valid (see prerequisites above)
the validation result
Name | Type | Description |
---|---|---|
token | System.String | a token |
Initializes an instance of the token checker
the future of this operation
Name | Type | Description |
---|---|---|
certUrl | System.String | url of the public keys used to sign the JWT tokens (e.g. https://www.googleapis.com/identitytoolkit/v3/relyingparty/publicKeys) - only tokens signed with one of the corresponding private keys are accepted |
issuer | System.String | issuer of the jwt token (e.g. https://session.firebase.google.com/freiewahl-application ) - only tokens with this issuer are accepted |
audience | System.String | valid audience for jwt tokens (e.g. freiewahl-application) - only tokens published for this audience will be accepted |
FreieWahl.Security.Signing.Buergerkarte
gets the data, signee and certificate that was used to create the given signed data
gets the data, signee and certificate that was used to create the given signed data
the decoded data from the CMS message, i.e. the signee id, signee name, signature certificate and the original data
Name | Type | Description |
---|---|---|
signedData | System.String | CMS signed data |
FreieWahl.Security.Signing.Common
signature provider, supports signing data - in the default implementation, SHA256withRSA is used for signing
only used in test code - checks if a signature is valid
true, if the signature is a valid signature for this data
Name | Type | Description |
---|---|---|
data | System.Byte[] | some data |
signature | System.Byte[] | the signature for this data |
signs some data (typically using SHA256withRSA or something similar)
signature for this data
Name | Type | Description |
---|---|---|
data | System.Byte[] | some data |
FreieWahl.Security.TimeStamps
Service for processing time stamp requests according to RFC 3161.
only used for testing purposes - checks if a timestamp is valid
checks if the timestamp is actually valid
Name | Type | Description |
---|---|---|
token | Org.BouncyCastle.Tsp.TimeStampToken | a timestamp token for some data |
data | System.Byte[] | some data |
A hash is calculated for the given data, a time stamp token with a timestamp from a trusted time stamp authority is returned.
a time stamp token issued by a time stamp authority
Name | Type | Description |
---|---|---|
data | System.Byte[] | the data for which a time stamp should be created |
checkCertificate | System.Boolean | flag whether the certficate used to create the time stamp should be verified, too |
FreieWahl.Security.UserHandling
Maps user information from a JWT auth token to user information including user name, id and mail address
Maps user information from a JWT auth token to user information including user name, id and mail address
the extracted user information (user name, id and mail address)
Name | Type | Description |
---|---|---|
result | System.Security.Claims.ClaimsPrincipal | user claims from a JWT auth token |
FreieWahl.Security.Signing.VotingTokens
The voting key store stores the key pairs required for signing blinded voting tokens
gets the key pair for the given voting id and question index
the key pair for the given voting id and question index
Name | Type | Description |
---|---|---|
votingId | System.String | a voting id |
index | System.Int32 | the question index |
Stores a list of private/public key pairs
the future of this operation
Name | Type | Description |
---|---|---|
votingId | System.String | the voting id the list of key pairs belongs to |
keys | System.Collections.Generic.Dictionary{System.Int32,Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair} | a list of keys - the key is the question index for a key pair, the value is the key pair that is stored |
FreieWahl.Security.TimeStamps
PKI statuses according to RFC 3161
When the PKIStatus contains the value zero a TimeStampToken, as requested, is present.
When the PKIStatus contains the value one a TimeStampToken, with modifications, is present.
When the PKIStatus contains the value two a TimeStamp request was rejected.
Revocation has occurred.
A warning that a revocation is imminent.
The request body part has not yet been processed, expect to hear more later.