Skip to content

Commit

Permalink
Merge pull request #170 from synfinatic/single-entry
Browse files Browse the repository at this point in the history
Switch to a single keyring entry
  • Loading branch information
synfinatic authored Dec 13, 2021
2 parents 9178c77 + a7f545c commit 9e84643
Show file tree
Hide file tree
Showing 5 changed files with 202 additions and 107 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# AWS SSO CLI Changelog

## [Unreleased]

### Changes
* Now use macOS `login` Keychain instead of `AWSSSOCli`
* All secure storage methods now store a single entry instead of multiple entries

## [v1.4.0]

### Breaking Changes
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT_VERSION := 1.4.0
PROJECT_VERSION := 1.5.0
DOCKER_REPO := synfinatic
PROJECT_NAME := aws-sso

Expand Down Expand Up @@ -50,6 +50,8 @@ DARWINARM64_BIN := $(DIST_DIR)$(PROJECT_NAME)-$(PROJECT_VERSION)-darwi

ALL: $(DIST_DIR)$(PROJECT_NAME) ## Build binary for this platform

include help.mk # place after ALL target and before all other targets

$(DIST_DIR)$(PROJECT_NAME): $(wildcard */*.go) .prepare
go build -ldflags='$(LDFLAGS)' -o $(DIST_DIR)$(PROJECT_NAME) cmd/*.go
@echo "Created: $(DIST_DIR)$(PROJECT_NAME)"
Expand Down Expand Up @@ -98,8 +100,6 @@ tags: cmd/*.go sso/*.go ## Create tags file for vim, etc
@echo Make sure you have Universal Ctags installed: https://github.com/universal-ctags/ctags
ctags -R

include help.mk # place after ALL target and before all other targets

.build-release: windows windows32 linux linux-arm64 darwin darwin-arm64

.validate-release: ALL
Expand Down Expand Up @@ -159,6 +159,9 @@ test: vet unittest lint ## Run important tests

precheck: test test-fmt test-tidy ## Run all tests that happen in a PR

# run everything but `lint` because that runs via it's own workflow
.build-tests: vet unittest test-tidy test-fmt

$(DIST_DIR):
@if test ! -d $(DIST_DIR); then mkdir -p $(DIST_DIR) ; fi

Expand Down Expand Up @@ -225,7 +228,7 @@ $(DARWINARM64_BIN): $(wildcard */*.go) .prepare
$(OUTPUT_NAME): $(wildcard */*.go) .prepare
go build -ldflags='$(LDFLAGS)' -o $(OUTPUT_NAME) cmd/*.go

docs: docs/default-region.png
docs: docs/default-region.png ## Build document files

docs/default-region.png:
dot -o docs/default-region.png -Tpng docs/default-region.dot
Expand Down
5 changes: 4 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ func main() {
}
log.Warnf("Using insecure json file for SecureStore: %s", sfile)
default:
cfg := storage.NewKeyringConfig(run_ctx.Settings.SecureStore, CONFIG_DIR)
cfg, err := storage.NewKeyringConfig(run_ctx.Settings.SecureStore, CONFIG_DIR)
if err != nil {
log.WithError(err).Fatalf("Unable to create SecureStore")
}
run_ctx.Store, err = storage.OpenKeyring(cfg)
if err != nil {
log.WithError(err).Fatalf("Unable to open SecureStore %s", run_ctx.Settings.SecureStore)
Expand Down
Loading

0 comments on commit 9e84643

Please sign in to comment.