Documentation ¶
Index ¶
- Constants
- func CheckDelegationEvidence(delegationEvidence *model.DelegationEvidence) (decision model.Decision)
- type AuthorizationRegistry
- type Clock
- type IShareAuthorizationRegistry
- func (iShareAuthRegistry *IShareAuthorizationRegistry) GetDelegationEvidence(issuer string, delegationTarget string, requiredPolicies *[]model.Policy, ...) (delegeationEvidence *model.DelegationEvidence, httpErr model.HttpError)
- func (iShareAuthRegistry *IShareAuthorizationRegistry) GetPDPRegistry() *model.AuthorizationRegistry
- type IShareDecider
- type IShareTrustedParticipantRepository
- type PartyParseFunc
- type RealClock
- type TokenFunc
- type TokenHandler
- func (tokenHandler *TokenHandler) GenerateSignedToken(arId string, clientId string) (signedToken string, err error)
- func (th *TokenHandler) GetKeyFromToken(token *jwt.Token) (key *rsa.PublicKey, err error)
- func (tokenHandler *TokenHandler) GetTokenFromAR(authorizationRegistry *model.AuthorizationRegistry) (accessToken string, httpErr model.HttpError)
- func (th *TokenHandler) ParseIShareToken(tokenString string) (parsedToken *model.IShareToken, httpErr model.HttpError)
- func (th *TokenHandler) ParsePartyToken(tokenString string) (parsedToken *model.PartyToken, httpErr model.HttpError)
- func (th *TokenHandler) ParseTrustedListToken(tokenString string) (parsedToken *model.TrustedListToken, httpErr model.HttpError)
- type TrustedListParseFunc
- type TrustedParticipantRepository
Constants ¶
View Source
const ArDelegationPathVar = "ISHARE_DELEGATION_PATH"
View Source
const ArTokenPathVar = "ISHARE_TOKEN_PATH"
View Source
const AuthorizationRegistryIdVar = "ISHARE_AR_ID"
View Source
const AuthorizationRegistryUrlVar = "ISHARE_AUTHORIZATION_REGISTRY_URL"
View Source
const CertificatePathVar = "ISHARE_CERTIFICATE_PATH"
View Source
const FingerprintsListEnvVar = "ISHARE_TRUSTED_FINGERPRINTS_LIST"
View Source
const KeyPathVar = "ISHARE_KEY_PATH"
View Source
const SatellitUrlEnvVar = "ISHARE_TRUST_ANCHOR_URL"
View Source
const SatelliteIdEnvVar = "ISHARE_TRUST_ANCHOR_ID"
View Source
const SatelliteTokenPathEnvVar = "ISHARE_TRUST_ANCHOR_TOKEN_PATH"
View Source
const SatelliteTrustedListPathEnvVar = "ISHARE_TRUST_ANCHOR_TRUSTED_LIST_PATH"
View Source
const TrustedListUpdateRateEnvVar = "ISHARE_TRUSTED_LIST_UPDATE_RATE"
Variables ¶
This section is empty.
Functions ¶
func CheckDelegationEvidence ¶
func CheckDelegationEvidence(delegationEvidence *model.DelegationEvidence) (decision model.Decision)
Types ¶
type AuthorizationRegistry ¶
type AuthorizationRegistry interface { GetPDPRegistry() *model.AuthorizationRegistry GetDelegationEvidence(issuer string, delegationTarget string, requiredPolicies *[]model.Policy, authorizationRegistry *model.AuthorizationRegistry) (delegeationEvidence *model.DelegationEvidence, httpErr model.HttpError) }
type IShareAuthorizationRegistry ¶
type IShareAuthorizationRegistry struct {
// contains filtered or unexported fields
}
func NewIShareAuthorizationRegistry ¶
func NewIShareAuthorizationRegistry() (registry *IShareAuthorizationRegistry)
* * Init reades and decodes the key and certificate to be used when contacting the AR
func (*IShareAuthorizationRegistry) GetDelegationEvidence ¶
func (iShareAuthRegistry *IShareAuthorizationRegistry) GetDelegationEvidence(issuer string, delegationTarget string, requiredPolicies *[]model.Policy, authorizationRegistry *model.AuthorizationRegistry) (delegeationEvidence *model.DelegationEvidence, httpErr model.HttpError)
func (*IShareAuthorizationRegistry) GetPDPRegistry ¶
func (iShareAuthRegistry *IShareAuthorizationRegistry) GetPDPRegistry() *model.AuthorizationRegistry
type IShareDecider ¶
type IShareDecider struct {
// contains filtered or unexported fields
}
func NewIShareDecider ¶
func NewIShareDecider(ar AuthorizationRegistry, config config.Config) *IShareDecider
type IShareTrustedParticipantRepository ¶
type IShareTrustedParticipantRepository struct {
// contains filtered or unexported fields
}
func NewTrustedParticipantRepository ¶
func NewTrustedParticipantRepository(tokenFunc TokenFunc, trustedListParserFunc TrustedListParseFunc, partyParseFunc PartyParseFunc) *IShareTrustedParticipantRepository
func (IShareTrustedParticipantRepository) IsTrusted ¶
func (icr IShareTrustedParticipantRepository) IsTrusted(caCertificate *x509.Certificate, clientCertificate *x509.Certificate, clientId string) (isTrusted bool)
type PartyParseFunc ¶
type PartyParseFunc func(string) (*model.PartyToken, model.HttpError)
type TokenHandler ¶
type TokenHandler struct { /** * Clock interface for validating tokens */ Clock Clock // contains filtered or unexported fields }
func NewTokenHandler ¶
func NewTokenHandler() (tokenHandler *TokenHandler)
func (*TokenHandler) GenerateSignedToken ¶
func (tokenHandler *TokenHandler) GenerateSignedToken(arId string, clientId string) (signedToken string, err error)
func (*TokenHandler) GetKeyFromToken ¶
func (th *TokenHandler) GetKeyFromToken(token *jwt.Token) (key *rsa.PublicKey, err error)
func (*TokenHandler) GetTokenFromAR ¶
func (tokenHandler *TokenHandler) GetTokenFromAR(authorizationRegistry *model.AuthorizationRegistry) (accessToken string, httpErr model.HttpError)
func (*TokenHandler) ParseIShareToken ¶
func (th *TokenHandler) ParseIShareToken(tokenString string) (parsedToken *model.IShareToken, httpErr model.HttpError)
func (*TokenHandler) ParsePartyToken ¶
func (th *TokenHandler) ParsePartyToken(tokenString string) (parsedToken *model.PartyToken, httpErr model.HttpError)
func (*TokenHandler) ParseTrustedListToken ¶
func (th *TokenHandler) ParseTrustedListToken(tokenString string) (parsedToken *model.TrustedListToken, httpErr model.HttpError)
type TrustedListParseFunc ¶
type TrustedListParseFunc func(string) (*model.TrustedListToken, model.HttpError)
type TrustedParticipantRepository ¶
type TrustedParticipantRepository interface {
IsTrusted(caCertificate *x509.Certificate, clientCertificate *x509.Certificate, clientId string) (isTrusted bool)
}
Click to show internal directories.
Click to hide internal directories.