Skip to content

Commit

Permalink
Add Duo MFA to the Github backend (#3696)
Browse files Browse the repository at this point in the history
  • Loading branch information
immutability authored and jefferai committed Dec 18, 2017
1 parent 288c932 commit f8cdeec
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions builtin/credential/github/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/google/go-github/github"
"github.com/hashicorp/go-cleanhttp"
"github.com/hashicorp/vault/helper/mfa"
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/framework"
"golang.org/x/oauth2"
Expand Down Expand Up @@ -35,21 +36,19 @@ func Backend() *backend {
}

allPaths := append(b.TeamMap.Paths(), b.UserMap.Paths()...)

b.Backend = &framework.Backend{
Help: backendHelp,

PathsSpecial: &logical.Paths{
Root: mfa.MFARootPaths(),
Unauthenticated: []string{
"login",
},
},

Paths: append([]*framework.Path{
pathConfig(&b),
pathLogin(&b),
}, allPaths...),

}, append(allPaths, mfa.MFAPaths(b.Backend, pathLogin(&b))...)...),
AuthRenew: b.pathLoginRenew,
BackendType: logical.TypeCredential,
}
Expand Down

0 comments on commit f8cdeec

Please sign in to comment.