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

Resolves #349: Add Browser IDP & upgrade to saml2aws v2.32.0 #350

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "third_party/saml2aws"]
path = third_party/saml2aws
url = https://github.com/richardcase/saml2aws.git
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently we are using a forked version of saml2aws to support Ping with NTLM:
richardcase/saml2aws@e3668c0

We will need to either get this merged in with upstream repo or update the forked version.

Copy link
Author

Choose a reason for hiding this comment

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

Fair enough. Is there a PR against saml2aws to get your NTLM patch in the upstream repo? Is there a reason you are maintaining the fork?

Copy link
Contributor

Choose a reason for hiding this comment

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

@richardcase can you help with this query please?

Copy link
Contributor

Choose a reason for hiding this comment

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

No reason for us to maintain the fork other than not having made the PR upstream. I will try and get the rebase/PR done Monday so that we can ultimately get rid of the fork.

Copy link
Collaborator

Choose a reason for hiding this comment

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

hi @richardcase, any luck with submitting that PR to upstream?

Copy link
Contributor

Choose a reason for hiding this comment

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

To be honest, i completely forgot about this. You may want to fork into fidelity and then create the PR from there?

Copy link
Collaborator

Choose a reason for hiding this comment

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

no worries, ok will do. thanks for the update. 😄

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hopefully this will be merged some day: Versent/saml2aws#794

Copy link
Contributor

Choose a reason for hiding this comment

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

🤞

branch = ntlmchanges
url = https://github.com/Versent/saml2aws.git
branch = tags/v2.32.0
33 changes: 10 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,53 @@ module github.com/fidelity/kconnect
go 1.15

require (
github.com/AlecAivazis/survey/v2 v2.1.1
github.com/AlecAivazis/survey/v2 v2.2.2
github.com/Azure/azure-sdk-for-go v48.2.2+incompatible
github.com/Azure/go-autorest/autorest v0.11.15
github.com/Azure/go-autorest/autorest/azure/auth v0.5.5
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.3.0 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect
github.com/PuerkitoBio/goquery v1.5.1 // indirect
github.com/andybalholm/cascadia v1.2.0 // indirect
github.com/aws/aws-sdk-go v1.36.19
github.com/aws/aws-sdk-go v1.37.11
github.com/beevik/etree v1.1.0
github.com/blang/semver v3.5.0+incompatible
github.com/brianvoe/gofakeit/v5 v5.10.1
github.com/go-playground/validator/v10 v10.3.0
github.com/golang/mock v1.3.1
github.com/golangci/golangci-lint v1.31.0 // indirect
github.com/google/go-cmp v0.5.4
github.com/google/go-cmp v0.5.4 // indirect
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.1.1
github.com/google/uuid v1.2.0
github.com/imdario/mergo v0.3.10 // indirect
github.com/marshallbrekka/go-u2fhost v0.0.0-20200114212649-cc764c209ee9 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/mapstructure v1.3.2 // indirect
github.com/oklog/ulid v1.3.1
github.com/oklog/ulid/v2 v2.0.2 // indirect
github.com/onsi/ginkgo v1.13.0 // indirect
github.com/onsi/gomega v1.10.4
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/pkg/errors v0.9.1
github.com/satori/go.uuid v1.2.0 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/sirupsen/logrus v1.7.0
github.com/smartystreets/assertions v1.0.0 // indirect
github.com/sirupsen/logrus v1.7.1
github.com/spf13/afero v1.3.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.1.1
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.1
github.com/tidwall/gjson v1.6.0 // indirect
github.com/tidwall/pretty v1.0.1 // indirect
github.com/versent/saml2aws v1.8.5-0.20200622110128-d94772688a70
github.com/worr/saml2aws v2.15.0+incompatible // indirect
github.com/versent/saml2aws v0.0.0-00010101000000-000000000000
github.com/versent/saml2aws/v2 v2.32.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.16.0
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 // indirect
golang.org/x/mod v0.4.0
golang.org/x/tools v0.0.0-20201103235415-b653051172e4 // indirect
gopkg.in/ini.v1 v1.62.0
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 // indirect
gopkg.in/yaml.v2 v2.3.0
gopkg.in/yaml.v2 v2.4.0
honnef.co/go/tools v0.0.1-2020.1.5 // indirect
k8s.io/apimachinery v0.19.1
k8s.io/cli-runtime v0.19.1
k8s.io/client-go v0.19.1
k8s.io/kubectl v0.19.1 // indirect
sigs.k8s.io/controller-tools v0.4.0 // indirect
sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20201009223647-5031c94d9175 // indirect
sigs.k8s.io/structured-merge-diff/v2 v2.0.1 // indirect
sigs.k8s.io/yaml v1.2.0

)
Expand Down
680 changes: 67 additions & 613 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/aws/identifer.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"hash/fnv"

"github.com/versent/saml2aws/pkg/awsconfig"
"github.com/versent/saml2aws/v2/pkg/awsconfig"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/aws/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

package aws

import "github.com/versent/saml2aws/pkg/awsconfig"
import "github.com/versent/saml2aws/v2/pkg/awsconfig"

func MapCredsToIdentity(creds *awsconfig.AWSCredentials, profileName string) *Identity {
return &Identity{
Expand Down
7 changes: 5 additions & 2 deletions pkg/aws/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ package aws
import (
"fmt"

"github.com/versent/saml2aws/pkg/awsconfig"
"github.com/versent/saml2aws/v2/pkg/awsconfig"

"github.com/fidelity/kconnect/pkg/provider/identity"

kawsconfig "github.com/fidelity/kconnect/pkg/aws/awsconfig"
)

// NewIdentityStore will create a new AWS identity store
func NewIdentityStore(profile, idProviderName string) (identity.Store, error) {
path, _ := kawsconfig.LocateConfigFile()
return &awsIdentityStore{
configProvider: awsconfig.NewSharedCredentials(profile),
configProvider: awsconfig.NewSharedCredentials(profile, path),
idProviderName: idProviderName,
}, nil
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/plugins/identity/saml/saml.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"fmt"

"github.com/go-playground/validator/v10"
"github.com/versent/saml2aws"
"github.com/versent/saml2aws/pkg/cfg"
"github.com/versent/saml2aws/pkg/creds"
"github.com/versent/saml2aws/v2"
"github.com/versent/saml2aws/v2/pkg/cfg"
"github.com/versent/saml2aws/v2/pkg/creds"
"go.uber.org/zap"

kaws "github.com/fidelity/kconnect/pkg/aws"
Expand Down
6 changes: 3 additions & 3 deletions pkg/plugins/identity/saml/sp/aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sts"

"github.com/versent/saml2aws"
"github.com/versent/saml2aws/pkg/awsconfig"
"github.com/versent/saml2aws/pkg/cfg"
"github.com/versent/saml2aws/v2"
"github.com/versent/saml2aws/v2/pkg/awsconfig"
"github.com/versent/saml2aws/v2/pkg/cfg"

kaws "github.com/fidelity/kconnect/pkg/aws"
"github.com/fidelity/kconnect/pkg/config"
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/identity/saml/sp/aws/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (p *ServiceProvider) resolveIdpEndpoint(name string, cfg config.Configurati

func (p *ServiceProvider) resolveIdpProvider(name string, cfg config.ConfigurationSet) error {
//TODO: get this from saml2aws????
options := []string{"Akamai", "AzureAD", "ADFS", "ADFS2", "GoogleApps", "Ping", "PingNTLM", "JumpCloud", "Okta", "OneLogin", "PSU", "KeyCloak", "F5APM", "Shibboleth", "ShibbolethECP", "NetIQ"}
options := []string{"Akamai", "AzureAD", "ADFS", "ADFS2", "Browser", "GoogleApps", "Ping", "PingNTLM", "JumpCloud", "Okta", "OneLogin", "PSU", "KeyCloak", "F5APM", "Shibboleth", "ShibbolethECP", "NetIQ"}

return prompt.ChooseAndSet(cfg, name, "Select your identity provider", true, prompt.OptionsFromStringSlice(options))
}
2 changes: 1 addition & 1 deletion pkg/plugins/identity/saml/sp/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package sp

import (
"github.com/versent/saml2aws/pkg/cfg"
"github.com/versent/saml2aws/v2/pkg/cfg"

"github.com/fidelity/kconnect/pkg/config"
"github.com/fidelity/kconnect/pkg/provider/common"
Expand Down
2 changes: 1 addition & 1 deletion third_party/saml2aws
Submodule saml2aws updated 107 files