identityprovider

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTPasswdMinPassLength = 14
)

Variables

View Source
var (
	HTPasswdPassRegexAscii          = regexp.MustCompile(`^[\x20-\x7E]+$`)
	HTPasswdPassRegexHasUpper       = regexp.MustCompile(`[A-Z]`)
	HTPasswdPassRegexHasLower       = regexp.MustCompile(`[a-z]`)
	HTPasswdPassRegexHasNumOrSymbol = regexp.MustCompile(`[^a-zA-Z]`)

	HTPasswdPasswordValidators = []validator.String{
		stringvalidator.LengthAtLeast(HTPasswdMinPassLength),
		stringvalidator.RegexMatches(HTPasswdPassRegexAscii, "password should use ASCII-standard characters only"),
		stringvalidator.RegexMatches(HTPasswdPassRegexHasUpper, "password must contain uppercase characters"),
		stringvalidator.RegexMatches(HTPasswdPassRegexHasLower, "password must contain lowercase characters"),
		stringvalidator.RegexMatches(HTPasswdPassRegexHasNumOrSymbol, "password must contain numbers or symbols"),
	}

	HTPasswdUsernameValidators = []validator.String{
		stringvalidator.RegexMatches(regexp.MustCompile(`^[^/:%]*$`), "username may not contain the characters: '/:%'"),
	}
)
View Source
var LDAPAttrDefaultID []string = []string{"dn"}
View Source
var LDAPAttrDefaultName []string = []string{"cn"}
View Source
var LDAPAttrDefaultPrefferedUsername []string = []string{"uid"}

Functions

func CreateGoogleIDPBuilder

func CreateGoogleIDPBuilder(ctx context.Context, mappingMethod string, state *GoogleIdentityProvider) (*cmv1.GoogleIdentityProviderBuilder, error)

func New

func New() resource.Resource

Types

type GithubIdentityProvider

type GithubIdentityProvider struct {
	CA            types.String `tfsdk:"ca"`
	ClientID      types.String `tfsdk:"client_id"`
	ClientSecret  types.String `tfsdk:"client_secret"`
	Hostname      types.String `tfsdk:"hostname"`
	Organizations types.List   `tfsdk:"organizations"`
	Teams         types.List   `tfsdk:"teams"`
}

type GitlabIdentityProvider

type GitlabIdentityProvider struct {
	CA           types.String `tfsdk:"ca"`
	ClientID     types.String `tfsdk:"client_id"`
	ClientSecret types.String `tfsdk:"client_secret"`
	URL          types.String `tfsdk:"url"`
}

type GoogleIdentityProvider

type GoogleIdentityProvider struct {
	ClientID     types.String `tfsdk:"client_id"`
	ClientSecret types.String `tfsdk:"client_secret"`
	HostedDomain types.String `tfsdk:"hosted_domain"`
}

type HTPasswdIdentityProvider

type HTPasswdIdentityProvider struct {
	Users []HTPasswdUser `tfsdk:"users"`
}

type HTPasswdUser

type HTPasswdUser struct {
	Username types.String `tfsdk:"username"`
	Password types.String `tfsdk:"password"`
}

type IdentityProviderResource

type IdentityProviderResource struct {
	// contains filtered or unexported fields
}

func (*IdentityProviderResource) Configure

func (*IdentityProviderResource) Create

func (*IdentityProviderResource) Delete

func (*IdentityProviderResource) ImportState

func (*IdentityProviderResource) Metadata

func (*IdentityProviderResource) Read

func (*IdentityProviderResource) Schema

func (*IdentityProviderResource) Update

func (*IdentityProviderResource) ValidateConfig

type IdentityProviderState

type IdentityProviderState struct {
	Cluster       types.String              `tfsdk:"cluster"`
	ID            types.String              `tfsdk:"id"`
	Name          types.String              `tfsdk:"name"`
	MappingMethod types.String              `tfsdk:"mapping_method"`
	HTPasswd      *HTPasswdIdentityProvider `tfsdk:"htpasswd"`
	Gitlab        *GitlabIdentityProvider   `tfsdk:"gitlab"`
	Github        *GithubIdentityProvider   `tfsdk:"github"`
	Google        *GoogleIdentityProvider   `tfsdk:"google"`
	LDAP          *LDAPIdentityProvider     `tfsdk:"ldap"`
	OpenID        *OpenIDIdentityProvider   `tfsdk:"openid"`
}

type LDAPIdentityProvider

type LDAPIdentityProvider struct {
	BindDN       types.String                    `tfsdk:"bind_dn"`
	BindPassword types.String                    `tfsdk:"bind_password"`
	CA           types.String                    `tfsdk:"ca"`
	Insecure     types.Bool                      `tfsdk:"insecure"`
	URL          types.String                    `tfsdk:"url"`
	Attributes   *LDAPIdentityProviderAttributes `tfsdk:"attributes"`
}

type LDAPIdentityProviderAttributes

type LDAPIdentityProviderAttributes struct {
	EMail             types.List `tfsdk:"email"`
	ID                types.List `tfsdk:"id"`
	Name              types.List `tfsdk:"name"`
	PreferredUsername types.List `tfsdk:"preferred_username"`
}

type OpenIDIdentityProvider

type OpenIDIdentityProvider struct {
	CA                       types.String                  `tfsdk:"ca"`
	Claims                   *OpenIDIdentityProviderClaims `tfsdk:"claims"`
	ClientID                 types.String                  `tfsdk:"client_id"`
	ClientSecret             types.String                  `tfsdk:"client_secret"`
	ExtraScopes              types.List                    `tfsdk:"extra_scopes"`
	ExtraAuthorizeParameters types.Map                     `tfsdk:"extra_authorize_parameters"`
	Issuer                   types.String                  `tfsdk:"issuer"`
}

type OpenIDIdentityProviderClaims

type OpenIDIdentityProviderClaims struct {
	EMail             types.List `tfsdk:"email"`
	Groups            types.List `tfsdk:"groups"`
	Name              types.List `tfsdk:"name"`
	PreferredUsername types.List `tfsdk:"preferred_username"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL