Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds MFA Duo configuration #443

Merged
merged 1 commit into from
Aug 2, 2019

Conversation

petems
Copy link
Contributor

@petems petems commented Jun 11, 2019

Adds ability to configure MFA with Duo: https://www.vaultproject.io/docs/enterprise/mfa/mfa-duo.html

Copy link
Contributor

@tyrannosaurus-becks tyrannosaurus-becks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, @petems ! Just a couple of minor things.

vault/resource_mfa_duo_test.go Outdated Show resolved Hide resolved
vault/resource_mfa_duo.go Show resolved Hide resolved
@ghost ghost added size/L and removed size/XL labels Jun 12, 2019
@petems
Copy link
Contributor Author

petems commented Jun 13, 2019

Hmm, test failure is for TestDataSourcePolicyDocument... can we run again?

@tyrannosaurus-becks
Copy link
Contributor

Looks like I get a test failure when I run them locally against Vault enterprise!

$ go test -v -run TestMFADuoBasic
=== RUN   TestMFADuoBasic
--- FAIL: TestMFADuoBasic (0.06s)
    testing.go:568: Step 0 error: After applying this step, the plan was not empty:
        
        DIFF:
        
        UPDATE: vault_mfa_duo.test
          api_hostname:    "api-2b5c39f5.duosecurity.com" => "api-2b5c39f5.duosecurity.com"
          id:              "mfa-duo-4083353440263821461" => "mfa-duo-4083353440263821461"
          integration_key: "" => "BIACEUEAXI20BNWTEYXT"
          mount_accessor:  "auth_userpass_59c73587" => "auth_userpass_59c73587"
          name:            "mfa-duo-4083353440263821461" => "mfa-duo-4083353440263821461"
          push_info:       "" => "from=loginortal&domain=example.com"
          secret_key:      "" => "8C7THtrIigh2rPZQMbguugt8IUftWhMRCOBzbuyz"
          username_format: "user@example.com" => "user@example.com"
        
        
        
        STATE:
        
        vault_auth_backend.userpass:
          ID = userpass-6631647075597508582
          provider = provider.vault
          accessor = auth_userpass_59c73587
          default_lease_ttl_seconds = 0
          description = 
          listing_visibility = 
          local = false
          max_lease_ttl_seconds = 0
          path = userpass-6631647075597508582
          type = userpass
        vault_mfa_duo.test:
          ID = mfa-duo-4083353440263821461
          provider = provider.vault
          api_hostname = api-2b5c39f5.duosecurity.com
          integration_key = 
          mount_accessor = auth_userpass_59c73587
          name = mfa-duo-4083353440263821461
          push_info = 
          secret_key = 
          username_format = user@example.com
        
          Dependencies:
            vault_auth_backend.userpass
    testing.go:629: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.
        
        Error: config is invalid: cannot write to a path ending in '/'
        
        State: vault_auth_backend.userpass:
          ID = userpass-6631647075597508582
          provider = provider.vault
          accessor = auth_userpass_59c73587
          default_lease_ttl_seconds = 0
          description = 
          listing_visibility = 
          local = false
          max_lease_ttl_seconds = 0
          path = userpass-6631647075597508582
          type = userpass
        vault_mfa_duo.test:
          ID = mfa-duo-4083353440263821461
          provider = provider.vault
          api_hostname = api-2b5c39f5.duosecurity.com
          integration_key = 
          mount_accessor = auth_userpass_59c73587
          name = mfa-duo-4083353440263821461
          push_info = 
          secret_key = 
          username_format = user@example.com
        
          Dependencies:
            vault_auth_backend.userpass
FAIL
exit status 1
FAIL	github.com/terraform-providers/terraform-provider-vault/vault	0.069s

@petems petems force-pushed the add_duo_mfa branch 3 times, most recently from d07c8ec to 2175386 Compare August 2, 2019 21:51
@petems
Copy link
Contributor Author

petems commented Aug 2, 2019

@tyrannosaurus-becks The tests should pass now! The API wont return the secret key and integration key, so it was overwriting them as blank second time round.

Copy link
Contributor

@tyrannosaurus-becks tyrannosaurus-becks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, the test passes for me now. Thanks @petems !!! :-)

@tyrannosaurus-becks tyrannosaurus-becks merged commit d7761aa into hashicorp:master Aug 2, 2019
dandandy pushed a commit to dandandy/terraform-provider-vault that referenced this pull request Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants