Documentation
¶
Index ¶
- Constants
- func GetBoolFromString(s string) bool
- func GetConfigForCluster(ctx context.Context, bs service.BootstrapService, ...) ([]byte, error)
- func GetConfigForUser(ctx context.Context, bs service.BootstrapService, ...) ([]byte, error)
- func GetSessionTypeString(t string) string
- func GetStringFromBool(val bool) string
- func GetUserAttrs(cn string) map[string]string
- func GetUserCN(attrs map[string]string) string
- type CNAttributes
Constants ¶
View Source
const ( // AccountIDAttrCN is accountID attribute key of CN AccountIDAttrCN = "a" // PartnerIDAttrCN is partnerID attribute key of CN PartnerIDAttrCN = "p" // OrganizationIDAttrCN is organizationID attribute key of CN OrganizationIDAttrCN = "o" // IsSSOAttrCN is accountID isSSO attribute key of CN IsSSOAttrCN = "is" // EnforceSessionAttrCN is enforeSession attribute key of CN EnforceSessionAttrCN = "es" // UsernameAttrCN is username attribute key of CN UsernameAttrCN = "u" // SessionTypeCN type of kubcel session cli/web/system SessionTypeCN = "st" // SystemUserCN is system user attribute key of CN SystemUserCN = "su" // TerminalShell is the session originated for a terminal based kubectl cli TerminalShell = "ts" // WebShell is the session originated for browser based kubectl WebShell = "ws" // ParalusSystem is the session originated for paralus system controller purpose e.g. native helm ParalusSystem = "rs" // RelayNetwork is the session originated for custom relay network (non-core-relay) RelayNetworkCN = "rn" )
Variables ¶
This section is empty.
Functions ¶
func GetBoolFromString ¶
GetBoolFromString returns bool values of string
func GetConfigForCluster ¶
func GetConfigForCluster(ctx context.Context, bs service.BootstrapService, req *sentryrpc.GetForClusterRequest, pf cryptoutil.PasswordFunc, kss service.KubeconfigSettingService, sessionType string) ([]byte, error)
GetConfigForCluster returns YAML encoded kubeconfig
func GetConfigForUser ¶
func GetConfigForUser(ctx context.Context, bs service.BootstrapService, aps service.AccountPermissionService, gps service.GroupPermissionService, req *sentryrpc.GetForUserRequest, pf cryptoutil.PasswordFunc, kss service.KubeconfigSettingService, ksvc service.ApiKeyService, os service.OrganizationService, ps service.PartnerService) ([]byte, error)
GetConfigForUser returns YAML encoding of kubeconfig
func GetSessionTypeString ¶
GetSessionTypeString get type description
func GetStringFromBool ¶
GetStringFromBool returns string value of bool
func GetUserAttrs ¶
GetUserAttrs returns attrs from cn
Types ¶
type CNAttributes ¶
type CNAttributes struct { AccountID string PartnerID string OrganizationID string Username string IsSSO bool EnforceSession bool SessionType string SystemUser bool RelayNetwork bool }
CNAttributes are the attributes encoded in CommonName of kubeconfig cert
func GetCNAttributes ¶
func GetCNAttributes(cn string) (cnAttr CNAttributes)
GetCNAttributes gets attributes from CN
func (*CNAttributes) GetCN ¶
func (cn *CNAttributes) GetCN() string
GetCN returns CommonName using CNAttributes
Click to show internal directories.
Click to hide internal directories.