Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DomainScopeOperation = DOMAINSCOPEOPERATION{
CreateTicket: "createTicket",
DeleteTicket: "deleteTicket",
CreateDomain: "createDomain",
DeleteDomain: "deleteDomain",
}
View Source
var KmsOperation = KMSOPERATION{
Encrypt: "encrypt",
Decrypt: "decrypt",
}
View Source
var Operation = OPERATION{
Create: "create",
Delete: "delete",
AddMember: "addMember",
DelMember: "delMember",
List: "list",
Show: "show",
Info: "info",
SetSecret: "setSecret",
GetSecret: "getSecret",
}
Functions ¶
This section is empty.
Types ¶
type AwsAssumeRole ¶
type AwsPermissions ¶
type BannedUser ¶
type DBLayer ¶
type DBLayer interface { // GetTickets() ([]Ticket, error) // GetGroups() ([]TicketGroup, error) // Usable() bool DBType() string // Ban Table AddBannedUser(bannedUser BannedUser) error GetBannedUsers() ([]BannedUser, error) GetBannedUserByEmail(userEmail string) (BannedUser, error) UnbanUser(userEmail string) error // Session Table CreateSession(session *Session) error UpdateSession(prevToken string, currentToken string, currentTokenExpires int64, refreshToken string, ) bool DeleteSession(sessionID string, epoch int64) error GetSessionByRefreshToken(refreshToken string) (Session, error) GetSessions(scanType string) ([]Session, error) GetSessionByToken(token string) (Session, error) GetSessionsByEmail(email string) ([]Session, error) // Group Table GetAllGroups() ([]TicketGroup, error) GetGroup(groupName string) (TicketGroup, error) CreateGroup(group TicketGroup) error DeleteGroup(groupName string) error DoesGroupExist(groupName string) bool IsUserInTikiadmins(userEmail string) bool GetGroupMembers(groupName string) ([]string, error) IsUserMemberOfGroup(member string, groupName string) bool CanUserPerformGroupOperation(userEmail string, operation string) bool GetGroupNamesOfUser(userEmail string) ([]string, error) GetGroupsOfUser(userEmail string) ([]TicketGroup, error) CanUserAccessToTicket(userEmail string, ticketPath string) bool AddMemberToGroup(newMember string, groupName string, changedBy string) error DelMemberFromGroup(memberToDelete string, groupName string, changedBy string) error // Ticket Table GetAllTickets() ([]Ticket, error) QueryTicketByPath(ticketPath string) (Ticket, error) DoesTicketExist(ticketPath string) bool CreateTicket(ticket Ticket) error DeleteTicket(ticketPath string, ticketType string) error IsUserAllowedByDomainScope(userEmail string, ticketOrDomainPath string, domainScopeOperation string) bool SetTicketSecret(ticketPath string, secretData string) error GetTicketSecret(ticketPath string) (string, error) CanUserPerformTicketOperation(userEmail string, operationType string) bool // Domain Table CanUserPerformDomainOperation(userEmail string, operation string) bool DoesTicketDomainExist(ticketDomainPath string) bool GetAllDomains() ([]TicketDomain, error) GetDomain(domainPath string) (TicketDomain, error) CreateDomain(domain TicketDomain) error DeleteDomain(domainPath string) error IsUserBanned(userEmail string) bool }
type DOMAINSCOPEOPERATION ¶
type K8sDetails ¶
type KMSOPERATION ¶
type Session ¶
type Session struct { SessID string `json:"sessId"` SessionOwner string `json:"sessionOwner"` AccessToken string `json:"accessToken"` IdToken string `json:"idToken"` Expire string `jspn:"expire"` RefreshToken string `json:"refreshToken"` TokenType string `json:"tokenType"` UserInfo struct { Id string `json:"id"` Email string `json:"email"` VerifiedEmail string `json:"verifiedEmail"` Picture string `json:"picture"` Hd string `json:"hd"` } Epoch int64 `json:"epoch"` SessionExpEpoch int64 `json:"sessionExpEpoch"` PreviousIdToken string `json:"prevIdToken"` Details string `json:"details"` Rtimes int `json:"rTimes,default:1"` IsRevoked bool `json:"isRevoked,default:false"` }
type SessionExpose ¶
type SessionExpose struct { SessionId string `json:"sessionId"` SessionOwner string `json:"sessionOwner"` // email SessionDetails string `json:"sessionDetails"` // comment ExpiresAt string `json:"expiresAt"` Epoch int64 `json:"epoch"` SessionExpEpoch int64 `json:"sessionExpEpoch"` RefreshCount int `json:"refreshCount"` Revoked bool `json:"revoked"` }
type Ticket ¶
type Ticket struct { TicketPath string `json:"ticketPath"` TicketType string `json:"ticketType"` TicketInfo string `json:"ticketInfo"` TicketRegion string `json:"ticketRegion"` AwsAssumeRole AwsAssumeRole `json:"assumeRoleDetails,omitempty"` AwsPermissions AwsPermissions `json:"awsPermissions,omitempty"` OwnersGroup []string `json:"ownersGroup,omitempty"` SecretData string `json:"secretData,omitempty"` SourceAddresses []string `json:"sourceAddress,omitempty"` SAccountPassword string `json:"sAccountPassword,omitempty"` K8sDetails K8sDetails `json:"k8sDetails"` CreatedAt string `json:"createdAt"` CreatedBy string `json:"createdBy"` UpdatedAt string `json:"updatedAt"` UpdatedBy string `json:"updatedBy"` }
type TicketDomain ¶
type TicketDomain struct { DomainPath string `json:"domainPath"` OwnerGroup string `json:"ownerGroup"` Parent string `json:"parent"` DomainComment string `json:"domainComment"` CreatedAt int64 `json:"createdAt"` CreatedBy string `json:"createdBy"` UpdatedAt int64 `json:"updatedAt"` UpdatedBy string `json:"updatedBy"` }
type TicketGroup ¶
type TicketGroup struct { GroupName string `json:"groupName"` GroupMembers []string `json:"groupMembers"` InUseBy []string `json:"inUseBy,omitempty"` CreatedAt int64 `json:"createdAt,omitempty"` CreatedBy string `json:"createdBy,omitempty"` UpdatedAt int64 `json:"updatedAt,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` AccessPerms Aperms `json:"accessPerms,omitempty"` DomainScope DScope `json:"domainScope"` }
Click to show internal directories.
Click to hide internal directories.