// NewStandardPermissions returns permission checker with hardcoded roles
// that are built in when auth server starts in standard mode
NewStandardPermissions returns permission checker with hardcoded roles
that are built in when auth server starts in standard mode
// NewStandardPermissions returns permission checker with hardcoded roles // that are built in when auth server starts in standard mode
func NewStandardPermissions() PermissionChecker {
	sp := standardPermissions{}
	sp.permissions = make(map[teleport.Role](map[string]bool))
	sp.permissions[teleport.RoleAuth] = map[string]bool{
		ActionUpsertAuthServer: true,
		ActionGetAuthServers:   true,
	}
	sp.permissions[teleport.RoleUser] = map[string]bool{
		ActionGetAuthServers:     true,
		ActionSignIn:             true,
		ActionExtendWebSession:   true,
		ActionGenerateUserCert:   true,
		ActionGetCertAuthorities: true,
		ActionGetServers:         true,
		ActionGetSession:         true,
		ActionGetSessions:        true,
		ActionViewSession:        true,
	}
	sp.permissions[teleport.RoleProvisionToken] = map[string]bool{
		ActionRegisterUsingToken:    true,
		ActionRegisterNewAuthServer: true,
	}
	sp.permissions[teleport.RoleNode] = map[string]bool{
		ActionUpsertServer:       true,
		ActionGetServers:         true,
		ActionGetProxies:         true,
		ActionGetAuthServers:     true,
		ActionGetCertAuthorities: true,
		ActionGetUsers:           true,
		ActionGetUser:            true,
		ActionGetLocalDomain:     true,
		ActionGetUserKeys:        true,
		ActionUpsertSession:      true,
		ActionGetSession:         true,
		ActionGetSessions:        true,
		ActionEmitEvents:         true,
		ActionViewSession:        true,
	}
	sp.permissions[teleport.RoleProxy] = map[string]bool{
		ActionGetUser:                         true,
		ActionGetOIDCConnectorsWithoutSecrets: true,
		ActionGetReverseTunnels:               true,
		ActionGetServers:                      true,
		ActionUpsertProxy:                     true,
		ActionGetProxies:                      true,
		ActionGetAuthServers:                  true,
		ActionGetCertAuthorities:              true,
		ActionGetUsers:                        true,
		ActionGetLocalDomain:                  true,
		ActionGetUserKeys:                     true,
		ActionGetSession:                      true,
		ActionViewSession:                     true,
		ActionGetSessions:                     true,
		ActionCreateOIDCAuthRequest:           true,
		ActionValidateOIDCAuthCallback:        true,
		ActionEmitEvents:                      true,
	}
	sp.permissions[teleport.RoleWeb] = map[string]bool{
		ActionGetUser:          true,
		ActionGetAuthServers:   true,
		ActionUpsertSession:    true,
		ActionExtendWebSession: true,
		ActionGetWebSession:    true,
		ActionDeleteWebSession: true,
		ActionGetSession:       true,
		ActionViewSession:      true,
		ActionGetSessions:      true,
	}
	sp.permissions[teleport.RoleSignup] = map[string]bool{
		ActionGetSignupTokenData:  true,
		ActionCreateUserWithToken: true,
		ActionGetAuthServers:      true,
	}
	return &sp
}
func NewStandardPermissions ( ) PermissionChecker { sp := standardPermissions { } sp . permissions = make ( map [ teleport . Role ] ( map [ string ] bool ) ) sp . permissions [ teleport . RoleAuth ] = map [ string ] bool { ActionUpsertAuthServer : true , ActionGetAuthServers : true , } sp . permissions [ teleport . RoleUser ] = map [ string ] bool { ActionGetAuthServers : true , ActionSignIn : true , ActionExtendWebSession : true , ActionGenerateUserCert : true , ActionGetCertAuthorities : true , ActionGetServers : true , ActionGetSession : true , ActionGetSessions : true , ActionViewSession : true , } sp . permissions [ teleport . RoleProvisionToken ] = map [ string ] bool { ActionRegisterUsingToken : true , ActionRegisterNewAuthServer : true , } sp . permissions [ teleport . RoleNode ] = map [ string ] bool { ActionUpsertServer : true , ActionGetServers : true , ActionGetProxies : true , ActionGetAuthServers : true , ActionGetCertAuthorities : true , ActionGetUsers : true , ActionGetUser : true , ActionGetLocalDomain : true , ActionGetUserKeys : true , ActionUpsertSession : true , ActionGetSession : true , ActionGetSessions : true , ActionEmitEvents : true , ActionViewSession : true , } sp . permissions [ teleport . RoleProxy ] = map [ string ] bool { ActionGetUser : true , ActionGetOIDCConnectorsWithoutSecrets : true , ActionGetReverseTunnels : true , ActionGetServers : true , ActionUpsertProxy : true , ActionGetProxies : true , ActionGetAuthServers : true , ActionGetCertAuthorities : true , ActionGetUsers : true , ActionGetLocalDomain : true , ActionGetUserKeys : true , ActionGetSession : true , ActionViewSession : true , ActionGetSessions : true , ActionCreateOIDCAuthRequest : true , ActionValidateOIDCAuthCallback : true , ActionEmitEvents : true , } sp . permissions [ teleport . RoleWeb ] = map [ string ] bool { ActionGetUser : true , ActionGetAuthServers : true , ActionUpsertSession : true , ActionExtendWebSession : true , ActionGetWebSession : true , ActionDeleteWebSession : true , ActionGetSession : true , ActionViewSession : true , ActionGetSessions : true , } sp . permissions [ teleport . RoleSignup ] = map [ string ] bool { ActionGetSignupTokenData : true , ActionCreateUserWithToken : true , ActionGetAuthServers : true , } return & sp }
NewStandardPermissions returns permission checker with hardcoded roles
that are built in when auth server starts in standard mode
NewStandardPermissions returns permission checker with hardcoded roles that are built in when auth server starts in standard mode