How to configure the OIDC config with GO package-github.com/hashicorp/vault/api
mayankmike86 opened this issue · comments
We are able to initialize/unseal and enable the vault using bellow code.
newres, err := client.Sys().Init(&intireq)
resseal, err := client.Sys().Unseal("xxxxxxxxxxxxxxxxxxxxx")
fmt.Println("resseal:", resseal)
enableopt := vault.MountInput{}
enableopt.Type = "oidc"
client.SetToken("xxxxxxxxxxxxxxxxxx")
err = client.Sys().EnableAuthWithOptions("oidc", &enableopt)
We can see oidc enabled in UI also. Now we need to configure the oidc, which if done from UI it is using below POST api with configs id: "oidc", oidc_discovery_url:"xxxxxx"......
https://vault.xxxxxx.com/v1/auth/oidc/config
We need to configure the same from our GO code where we are using go client vault "github.com/hashicorp/vault/api"
Not able to get the method for auth configuration need help on correct method.