provider

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEntry

func GetEntry(conn *ldap.Conn, dn string, attrs ...string) (ldap.Entry, error)

GetEntry returns a specific entry and is a shortcut around the search function.

func MaskAttributes added in v0.4.0

func MaskAttributes(ctx context.Context, attributes map[string][]string) context.Context

MaskAttributes searches attributes of an LDAP entry for sensitive data and masks the values.

func MaskAttributesFromArray added in v0.4.0

func MaskAttributesFromArray(ctx context.Context, attributes []*ldap.EntryAttribute) context.Context

MaskAttributesFromArray is a MaskAttributes adapter for ldap.EntryAttribute-Arrays.

func New

func New(version string) func() provider.Provider

func NewLDAPObjectDataSource

func NewLDAPObjectDataSource() datasource.DataSource

func NewLDAPObjectResource

func NewLDAPObjectResource() resource.Resource

func NewLDAPSearchDataSource added in v0.3.0

func NewLDAPSearchDataSource() datasource.DataSource

func ToLDIF added in v0.4.0

func ToLDIF(entry interface{}) string

ToLDIF converts the given ldap entry into an LDIF representation.

Types

type LDAPObjectDataSource

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

func (*LDAPObjectDataSource) Configure

func (*LDAPObjectDataSource) Metadata

func (*LDAPObjectDataSource) Read

func (*LDAPObjectDataSource) Schema

type LDAPObjectDatasourceModel

type LDAPObjectDatasourceModel struct {
	Id                   types.String `tfsdk:"id"`
	DN                   types.String `tfsdk:"dn"`
	ObjectClasses        types.List   `tfsdk:"object_classes"`
	Attributes           types.Map    `tfsdk:"attributes"`
	AdditionalAttributes types.Set    `tfsdk:"additional_attributes"`
}

type LDAPObjectResource

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

func (*LDAPObjectResource) Configure

func (*LDAPObjectResource) Create

func (L *LDAPObjectResource) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse)

func (*LDAPObjectResource) Delete

func (L *LDAPObjectResource) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse)

func (*LDAPObjectResource) ImportState

func (*LDAPObjectResource) Metadata

func (*LDAPObjectResource) ModifyPlan

func (*LDAPObjectResource) Read

func (L *LDAPObjectResource) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse)

func (*LDAPObjectResource) Schema

func (*LDAPObjectResource) Update

func (L *LDAPObjectResource) Update(ctx context.Context, request resource.UpdateRequest, response *resource.UpdateResponse)

type LDAPObjectResourceModel

type LDAPObjectResourceModel struct {
	ID            types.String `tfsdk:"id"`
	DN            types.String `tfsdk:"dn"`
	ObjectClasses types.List   `tfsdk:"object_classes"`
	Attributes    types.Map    `tfsdk:"attributes"`
	IgnoreChanges types.List   `tfsdk:"ignore_changes"`
}

type LDAPProvider

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

LDAPProvider defines the provider implementation.

func (*LDAPProvider) Configure

func (*LDAPProvider) DataSources

func (p *LDAPProvider) DataSources(_ context.Context) []func() datasource.DataSource

func (*LDAPProvider) Metadata

func (*LDAPProvider) Resources

func (p *LDAPProvider) Resources(_ context.Context) []func() resource.Resource

func (*LDAPProvider) Schema

type LDAPProviderModel

type LDAPProviderModel struct {
	LDAPURL               types.String `tfsdk:"ldap_url"`
	LDAPBindDN            types.String `tfsdk:"ldap_bind_dn"`
	LDAPBindPassword      types.String `tfsdk:"ldap_bind_password"`
	LDAPTLSInsecureVerify types.Bool   `tfsdk:"ldap_tls_insecure_verify"`
	LDAPTLSUseStartTLS    types.Bool   `tfsdk:"ldap_tls_use_starttls"`
}

LDAPProviderModel describes the provider data model.

type LDAPSearchDataSource added in v0.3.0

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

func (*LDAPSearchDataSource) Configure added in v0.3.0

func (*LDAPSearchDataSource) Metadata added in v0.3.0

func (*LDAPSearchDataSource) Read added in v0.3.0

func (*LDAPSearchDataSource) Schema added in v0.3.0

type LDAPSearchDatasourceModel added in v0.3.0

type LDAPSearchDatasourceModel struct {
	Id                   types.String `tfsdk:"id"`
	BaseDN               types.String `tfsdk:"base_dn"`
	Scope                types.String `tfsdk:"scope"`
	Filter               types.String `tfsdk:"filter"`
	Results              types.List   `tfsdk:"results"`
	AdditionalAttributes types.Set    `tfsdk:"additional_attributes"`
}

type TFLoggerAdapter added in v0.4.0

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

TFLoggerAdapter is a Writer which is provided by the ldap package as a logger and logs using tflog.Debug.

func (TFLoggerAdapter) Write added in v0.4.0

func (T TFLoggerAdapter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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