Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CognitoSamlCommand = cli.Command{ Name: "saml-login-url", Description: "Generate a SAML login URL that can be used to login to Common Fate when you are using SAML SSO", Action: cli.ActionFunc(func(c *cli.Context) error { ctx := c.Context dc, err := deploy.ConfigFromContext(ctx) if err != nil { return err } o, err := dc.LoadOutput(ctx) if err != nil { return err } UserPoolDomain := o.UserPoolDomain SAMLIdentityProviderName := o.SAMLIdentityProviderName CognitoClientID := o.CognitoClientID FrontendDomainOutput := o.FrontendDomainOutput if UserPoolDomain == "" || SAMLIdentityProviderName == "" || CognitoClientID == "" || FrontendDomainOutput == "" { return fmt.Errorf("missing required output values") } url := fmt.Sprintf("https://%s/authorize?response_type=code&identity_provider=%s&client_id=%s&redirect_uri=https://%s", UserPoolDomain, SAMLIdentityProviderName, CognitoClientID, FrontendDomainOutput) fmt.Println(url) return nil }), }
View Source
var Command = cli.Command{ Name: "identity", Aliases: []string{"id"}, Description: "Identity commands are used to manage how your users login to Common Fate.\nYou can manage users and groups in the default Cognito user pool or configure your corporate SSO provider.", Usage: "Configure how your users login to Common Fate", Action: cli.ShowSubcommandHelp, Subcommands: []*cli.Command{ &sso.SSOCommand, &sync.SyncCommand, &CognitoSamlCommand, middleware.WithBeforeFuncs(&users.UsersCommand, PreventNonCognitoUsage()), middleware.WithBeforeFuncs(&groups.GroupsCommand, PreventNonCognitoUsage()), }, }
Functions ¶
func PreventNonCognitoUsage ¶
func PreventNonCognitoUsage() func(c *cli.Context) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.