Skip to content

Commit

Permalink
check if WIF is enabled on this edition of Vault
Browse files Browse the repository at this point in the history
  • Loading branch information
fairclothjm committed Apr 26, 2024
1 parent 3c6787b commit 541398c
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 51 deletions.
1 change: 1 addition & 0 deletions azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ func (p *azureProvider) getClientOptions() *arm.ClientOptions {
}

func (p *azureProvider) getTokenCredential(ctx context.Context, logger hclog.Logger, sys logical.SystemView) (azcore.TokenCredential, error) {
logger.Debug("getTokenCredential")
clientCloudOpts := azcore.ClientOptions{Cloud: p.settings.CloudConfig}

if p.settings.ClientSecret != "" {
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/terraform/vm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ resource "azurerm_public_ip" "vault_azure_pub_ip" {

# Restrict SSH access to the local public IP
data "http" "my_ip" {
url = "https://ifconfig.me/ip"
url = "https://ipinfo.io/ip"
}

resource "azurerm_network_security_group" "vault_azure_sg" {
Expand Down
30 changes: 17 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/hashicorp/vault-plugin-auth-azure

go 1.20
go 1.21

toolchain go1.22.2

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0
Expand All @@ -11,9 +13,9 @@ require (
github.com/hashicorp/go-hclog v1.6.2
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/vault/api v1.12.0
github.com/hashicorp/vault/sdk v0.11.0
github.com/hashicorp/vault/sdk v0.12.0
github.com/microsoftgraph/msgraph-sdk-go v1.35.0
golang.org/x/oauth2 v0.17.0
golang.org/x/oauth2 v0.18.0
)

require (
Expand All @@ -30,6 +32,8 @@ require (
github.com/microsoft/kiota-serialization-multipart-go v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/sasha-s/go-deadlock v0.2.0 // indirect
github.com/std-uritemplate/std-uritemplate/go v0.0.50 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect
Expand All @@ -50,12 +54,12 @@ require (
github.com/cjlapao/common-go v0.0.39 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fatih/color v1.14.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.6.0
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand All @@ -66,17 +70,17 @@ require (
github.com/hashicorp/go-retryablehttp v0.7.1 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/mlock v0.1.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.6 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/microsoft/kiota-abstractions-go v1.5.6 // indirect
github.com/microsoft/kiota-authentication-azure-go v1.0.2 // indirect
github.com/microsoft/kiota-http-go v1.3.1 // indirect
Expand All @@ -96,19 +100,19 @@ require (
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/pquerna/cachecontrol v0.1.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/otel v1.23.1 // indirect
go.opentelemetry.io/otel/metric v1.23.1 // indirect
go.opentelemetry.io/otel/trace v1.23.1 // indirect
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/grpc v1.61.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 541398c

Please sign in to comment.