Giter Club home page Giter Club logo

dce-cli's People

Contributors

amyschoen avatar drmmarsunited avatar eschwartz avatar joshmarsh avatar kddejong avatar marinatedpork avatar marissaann avatar nathanagood avatar robertcrockett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dce-cli's Issues

Provide CLI flags for backend configuration

Is your feature request related to a problem? Please describe.

The new backend will be local by default, and there is a feature request for using the YAML file as a source (see #15 ). This feature is to provide CLI flags for configuring the backend right on the CLI and without having to crack open a YAML file and edit it by hand if the user doesn't want.

Describe the solution you'd like

Suggests for flag names are welcome, and so also is the possibility that perhaps a single arg should be used that accepts a JSON configuration string (like some of the AWS CLI args). We should design this out before writing it to get the best user experience.

Describe alternatives you've considered

Additional context

Something like:

dce system deploy --backend-config="type=s3" --backend-config="bucket=mybucket"

would be pretty consistent with the Terraform configuration, but it feels a little inconsistent and clunky compared to the other CLI args existing.

Support `--expires-on` Flag for `dce leases create`

POST /leases require an expiresOn parameter to set the lease expiration date.

Add an --expires-on flag to the dce leases create command.

This would be a good time to talk about how we do time formatting in CLI args.
The API accepts an epoch timestamp (int), which we should support.
But it would be nice to also accept some more human readable args, eg:

dce leases create --expires-on=7d

Allow flags for dce init

Is your feature request related to a problem? Please describe.

The dce init command only works by prompting a user for the API URL and other information. Anything that is required should be able to be provided on the command line so dce init can be called in scripts.

Describe the solution you'd like

Something like dce init --api-url https://api.example.com. Basepath should be able to be provided but should just default to 'api', which will be the case for anyone except advanced users.

Describe alternatives you've considered

Using cat to write the config file works, but that could change at any time since it's not really documented behavior, nor is the format of the configuration file documented because while it's there editing the file outside the use of the CLI isn't particularly encouraged.

Additional context

`system deploy` logs are super verbose

The dce system deploy logs are super verbose. Seems like we're printing out Terraform TRACE level logs by default.

Default should be much less verbose logging. We're also missing some useful high-level logging outputs (eg. "Deployment succeeded!")

Bonus points would be to have logging levels be configurable here. But for now, just defaulting to less verbose logs would be a win.

Support `dce leases end <lease-id>`

dce-cli v0.3.0
dce v0.24.1

Is your feature request related to a problem? Please describe.

Currently, dce leases end requires an account ID and PrincipalID. This is not in line with dce leases login, dce leases describe etc, which accept a lease ID.

Note that this may not be directly supported by the DCE API (Optum/dce#121) . But the CLI could work around this, by doing a GET /leases/<id> first. Or, we can just fix that issue in DCE ๐Ÿ˜‰

Redirect terraform output to log file instead of console

Is your feature request related to a problem? Please describe.

The existing trace-level logging is pretty verbose and actually could be a little unnerving (thinking as a first-time user here). On one hand, it's nice to see that it's doing something but it makes one think something might be wrong.

Describe the solution you'd like

Recommend changing the writer from the console's STDOUT for normal logging to deploy.log hidden in the .dce directory. Would be nice to put errors to deploy-err.log or something like that to make things easier to find.

Describe alternatives you've considered

An alternative would be to not print it anywhere, but that doesn't seem right.

Additional context

Prompts do not handle long input strings correctly

When the user responds to a prompt for user input, the prompter will repeatedly echo the string if it is very long. For example, responding to the dce auth prompt should look like this:

~ dce auth
Enter API Token: xxxxx2Nlc3NLZXlJZCI6IkFTSUEzSklFNUZPTkpETEgyS0NEIiwic2VjcmV0QWNjZXNzS2V5IjoiSVdVRU1reGNFUmNGeWxNbDRRdmVjUmJZREZ6WWF6VEVFMEp4Um1kZSIsInNlc3Npb25Ub2tlbiI6IklRb0piM0pwWjJsdVgyVmpFT2ovLy8vLy8vLy8vd0VhQ1hWekxXVmhjM1F0TVNKR01FUUNJRElTdEpxV3ZDUE1WZGt5UlJHNE9La1hJZmlCdEdVRGdzxXVpZnV1T1crWEFpQTNTelAvQVF1czcwZmhITVNpSXNXbk5MdVQwR250aC90TmdtbFdKT0E2N0NyK0F3Z3hFQUFhRERjM05UYzRPRGMyT0RFMU5DSU0vL0RWMFlrUitsc0w3SWpnS3RzRDJpTVoyTkw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MVzBZZ1pDLzQ3WUlodFdwT2Z0dmFXbzdEdkdVR2I3Q1grN1B3dXhOVVlPUmtSTEthd05LOFh5aERpRjVUb01WODVBMXpmdlNiRUZKTStSdEVYc2lFbmVrQi9mRTZwcE10NjlEa0VCaERvNmZaSXhNc2N5Q1d1Nk9iaE9BZ1JqVTV2THhOV3orb2MwZ25icnBsTDIxZlNMaTZrZXZGUWZCVEFDRGlZc1NtdGlRWVRHZU45cXpQR01mOGxHdUtWRVZESGNqdXQ2L0xNb3A2UU5lelcvOEdxQXBHOHR4UnhVbTI1xzFoaXNzUXJOejA4ejJwUHNKWVNjbTNOUkQ1dk55TkRtd2kxaldlLzBwT3d6Z0V4eVFka09hbTlrcWg3R0E2dW5oQjNpQ2pYUVQ4TE9TS0hZUS9Cc2tPcjU0RUlhZ0VYUytQNERtWUlJVE8rWWNYTWlEWUdiZks2UFZockpFWFBvZ1dZZlRQbjRlU2NMIiwiZXhwaXJlVGltZSI6MTU3NTM5MjA2NX0=
.
.
.

This may be an issue with github.com/manifoldco/promptui.

Creating an account with a expiration parameter doesn't seem to work correctly

Version information
DCE v0.27.0

Describe the bug
When leasing an account with an expiration of 1h the account defaults to one week

To Reproduce
Steps to reproduce the behavior:

dce leases create -b 500 -c USD -e [email protected] -E 1h -p jacob.weyer12

Lease created: {
	"accountId": "889727206689",
	"budgetAmount": 500,
	"budgetCurrency": "USD",
	"budgetNotificationEmails": [
		"[email protected]"
	],
	"createdOn": 1582563804,
	"expiresOn": 1583168603, --> 03/02/2020 @ 5:03pm (UTC)
	"id": "5eb3f56b-d9e8-4025-a70e-baba17411c7c",
	"lastModifiedOn": 1582563804,
	"leaseStatus": "Active",
	"leaseStatusModifiedOn": 1582563804, -> 02/24/2020 @ 5:03pm (UTC)
	"leaseStatusReason": "Active",
	"principalId": "jacob.weyer12"
}

Doing the same with 2w still leased for only one week. Also trying just "1h" with quotes did not work.

Expected behavior
It should lease for only one hour, rather than one week

The DCE leases create prompt implies budget-currency is not required because it has a default of USD. It is required.

Version information

0.5.0 "reports as 0.4.0" due to #86
Ubuntu 20.04 on WSL2
Unknown Go Version
Bundled Terraform

Describe the bug

The DCE leases create prompt implies budget-currency is not required because it has a default of USD. It is required.

To Reproduce

$ dce leases create -b 10.0 -e [email protected] -E 1d -p nelson                                                                                                                                                                            
Error: required flag(s) "budget-currency" not set
Usage:
  dce leases create [flags]

Flags:
  -b, --budget-amount float      The leased accounts budget amount
  -c, --budget-currency string   The leased accounts budget currency (default "USD")
  -e, --email stringArray        The email address that budget notifications will be sent to
  -E, --expires-on string        The leased accounts expiry date as a long (UNIX epoch) or string (eg., '7d', '8h' (default "7d")
  -h, --help                     help for create
  -p, --principal-id string      Principle ID for the user of the leased account

Global Flags:
      --config string   config file (default is "$HOME/.dce/config.yaml")

Expected behavior

dce leases create -b 10.0 -e [email protected] -E 1d -p nelson                                                                                                                                                                            

and it just does its thing.

The command assumes USD and does not fatally exit with a help prompt.

Additional context

Use SDK to create TF backend

Creating a TF backend using terraform is a bit of inception -- ie, where does the tfstate for that backend-creation module live?

It's not really necessary to use TF for the backend creation, as we're not really maintaining state for the backend itself. It would be more straightforward to just use the AWS SDK for golang to create the backend resources

Improve API error messages

Using dce-cli v0.2.0

API error are not super user friendly:

eg.

~/$ ./dce-cli accounts list
err:  [GET /accounts][403] getAccountsForbidden ~/$ 

Proposing to:

  • Use human-readable error messages (eg, "You do you not have access to get account", or whatever)
  • Add a newline character to the end of the message, so the CLI prompt starts on a new line

Prompt for backend creation

Currently, DCE CLI creates an S3 backend with every call to dce deploy by default.

I may not want to create a backend on S\3 -- ie, I may just want to use a local backend for simplicity, for local development.

Would like if the CLI would prompt me, eg:

There is no terraform backend configured in your dce.yml file. Would you like to create a terraform state backend on S3? 
If not, a local backend will be used to store terraform state.
> 

404 error for cognito users login through CLI - unable to login active lease

Version

  • DCE CLI v0.4.0 (master)
  • Darwin C02XC78CJGH5 17.7.0 Darwin Kernel Version 17.7.0: Sun Jun 2 20:31:42 PDT 2019; root:xnu-4570.71.46~1/RELEASE_X86_64 x86_64
  • go version go1.14.2 darwin/amd64
  • Terraform v0.12.20

404 error when dce leased user (cognito) tries to login through dce CLI
404 error is displayed when running below command:
dce leases login --open-browser

To Reproduce

  1. Execute command "dce auth"
  2. Copy cognito user encrypted token and paste in terminal.
  3. Execute "dce leases login --open-browser " OR dce leases login --print-creds
  4. 404 error appears

Expected behavior
Cognito user should be able to login to leased account after running above commands.

Additional context
Currently I am logging in using STS master creds which works with above commands but not for cognito users. Also, after lease is destroyed, the destroyed account session is still Active (user can create resources until session is closed manually) which should be signed out.

image

go build fails: github.com/coreos/etcd/client errors

I'm running make build, with go v0.13.4.
I get the following errors:

# github.com/coreos/etcd/client
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:63:14: z.HasExtensions undefined (type codec.genHelperEncoder has no field or method HasExtensions)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:63:35: z.EncExt undefined (type codec.genHelperEncoder has no field or method EncExt)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:75:6: r.WriteArrayElem undefined (type codec.genHelperEncDriver has no field or method WriteArrayElem)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:83:6: r.WriteMapElemKey undefined (type codec.genHelperEncDriver has no field or method WriteMapElemKey)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:84:19: too many arguments in call to r.encDriver.EncodeString
        have (number, string)
        want (string)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:85:6: r.WriteMapElemValue undefined (type codec.genHelperEncDriver has no field or method WriteMapElemValue)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:94:6: r.WriteArrayElem undefined (type codec.genHelperEncDriver has no field or method WriteArrayElem)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:99:20: too many arguments in call to r.encDriver.EncodeString
        have (number, string)
        want (string)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:102:6: r.WriteMapElemKey undefined (type codec.genHelperEncDriver has no field or method WriteMapElemKey)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:103:19: too many arguments in call to r.encDriver.EncodeString
        have (number, string)
        want (string)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:103:19: too many errors
make: *** [build] Error 2
~/dev/dce-cli$ go build .
# github.com/coreos/etcd/client
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:63:14: z.HasExtensions undefined (type codec.genHelperEncoder has no field or method HasExtensions)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:63:35: z.EncExt undefined (type codec.genHelperEncoder has no field or method EncExt)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:75:6: r.WriteArrayElem undefined (type codec.genHelperEncDriver has no field or method WriteArrayElem)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:83:6: r.WriteMapElemKey undefined (type codec.genHelperEncDriver has no field or method WriteMapElemKey)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:84:19: too many arguments in call to r.encDriver.EncodeString
        have (number, string)
        want (string)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:85:6: r.WriteMapElemValue undefined (type codec.genHelperEncDriver has no field or method WriteMapElemValue)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:94:6: r.WriteArrayElem undefined (type codec.genHelperEncDriver has no field or method WriteArrayElem)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:99:20: too many arguments in call to r.encDriver.EncodeString
        have (number, string)
        want (string)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:102:6: r.WriteMapElemKey undefined (type codec.genHelperEncDriver has no field or method WriteMapElemKey)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:103:19: too many arguments in call to r.encDriver.EncodeString
        have (number, string)
        want (string)
../../.gvm/pkgsets/go1.13.4/global/pkg/mod/github.com/coreos/[email protected]+incompatible/client/keys.generated.go:103:19: too many errors

dce leases create should infer principalID for normal users

Non-admin users should only ever interact with their own leases. Therefore, the dce leases create command should infer the principalID from the user's temporary DCE System credentials rather than having them specify it using the --principalID flag.

Unable to issue commands to API via CLI.

Version information
CLI version 4.0
OSX 12.2.1

Describe the bug
After receiving the API auth token I'm unable to issue any commands via the API. I receive a "context deadline exceeded" error. This is for any command.

This is a fresh install and I continue to receive this error after multiple attempts to install.

To Reproduce
dce leases list
err: Get https://xxx.execute-api.us-east-1.amazonaws.com/api/leases?limit=25: context deadline exceeded

Steps to reproduce the behavior:

  1. When I type this Command, I get the following output

    ~ dce leases list ...
    err:  Get https://xxx.execute-api.us-east-1.amazonaws.com/api/leases?limit=25: context deadline exceeded
    
  2. Then when I type this other command, I get the following error

    ~ dce leases list ...
    err:  Get https://xxx.execute-api.us-east-1.amazonaws.com/api/leases?limit=25: context deadline exceeded
    

-->

Expected behavior
Recieve a response back.

Additional context

go get fails with "cannot find package"

Version information

tried on Mac and Linux (Azure Pipeline)
v0.3.0 is the latest dce-cli release
go v0.13.3

Describe the bug

go get github.com/Optum/dce-cli

package github.com/hashicorp/terraform/svchost/disco: cannot find package "github.com/hashicorp/terraform/svchost/disco" in any of:
	/opt/hostedtoolcache/go/1.13.4/x64/src/github.com/hashicorp/terraform/svchost/disco (from $GOROOT)
	/home/vsts/work/1/s/gopath/src/github.com/hashicorp/terraform/svchost/disco (from $GOPATH)
package github.com/pierrec/lz4/v3: cannot find package "github.com/pierrec/lz4/v3" in any of:
	/opt/hostedtoolcache/go/1.13.4/x64/src/github.com/pierrec/lz4/v3 (from $GOROOT)
	/home/vsts/work/1/s/gopath/src/github.com/pierrec/lz4/v3 (from $GOPATH)

Expected behavior

Should download this go module

Additional context

Use local TF backend by default

Is your feature request related to a problem? Please describe.

If I am using the CLI, I may not want to keep TF state in a S3 bucket.

Describe the solution you'd like

By default, the CLI will use a TF local state file for the backend configuration.

Describe alternatives you've considered

Additional context

Error after running `dce system deploy` second time

Version information

  • DCE CLI v0.3.0+
  • Mac OS: Darwin 18.7.0 Darwin Kernel Version 18.7.0
  • go version go1.13.5 darwin/amd64
  • 0.12?

Describe the bug

I can run dce system deploy fine once, but after destroying the infra when I run the command again I get the following error:

reading file in zip archive: file already exists: <HOME>/.dce/.cache/dce/0.23.0/lambda/accounts.zip

To Reproduce

Steps to reproduce the behavior:

  1. When I type this Command, I get the following output

    $ dce system deploy
    
  2. Then when I type this other command, I get the following error

    $ cd ~/.dce/.cache/module/
    $ ../terraform/<version>/terraform destroy -auto-approve -no-color
    $ dce system deploy
    'main.tf' already exists and --use-cached specified; using existing file
    Initializing
    Creating DCE infrastructure
    Retrieving artifacts location
    Artifacts bucket =  <some bucket>
    Deploying code assets to DCE infrastructure
    Downloading DCE code assets
    reading file in zip archive: file already exists: ~/.dce/.cache/dce/0.23.0/lambda/accounts.zip
    

Expected behavior

Additional context

Workaround: remove the ~/.dce/.cache directory

Tracking dce-cli usage: User-Agent header?

Would be cool to be able to track usage of the dce-cli, for analytics/ops purposes.

Could we do something like add a User-Agent: dce-cli header to API requests, which would then show up in CloudTrail logs?

Commands should output valid JSON to stdout

By default, all CLI commands should output JSON to stdout.

Currently, we have some commands that don't output valid json,
eg:

$ dce leases create ...
Lease created: {
        "accountId": "123456789012",
       ...
}

Other commands print valid JSON, but to stderr, for example, dce leases list


I would like to see some standardization around CLI output formatting.

Ideally, we'd have support for both JSON (computer-readable) and column/text (human-readable) formats.

Users could configure the output format via a --output=json CLI flag, or with a output: json config value in dce.yml

See how AWS controls CLI output formatting:
https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-output.html

"access is denied" while trying to deploy DCE from Windows CMD

dce system deploy currently runs terraform init and apply from temporary directories. The cli is unable to delete these directories in windows due to "access is denied" errors being thrown while trying to delete .terraform/ from said directories.

ID-less login doesn't work and doesn't seem to exist in DCE project?

Version information

DCE-cli: master at 2021/2/1
DCE: master at 2021/2/1

Describe the bug

dce leases login doesn't work without an explicit ID.

To Reproduce

  1. Run dce leases login. Make sure there's no ID/argument!
time="2021-02-01T00:50:00-07:00" level=debug msg="Requesting leased account credentials"
time="2021-02-01T00:50:31-07:00" level=debug msg="V4 Signing Request:\n POST /api/leases/auth HTTP/1.1\r\nHost: xxxxxxxx.execute-api.us-east-1.amazonaws.com\r\nAccept: application/json\r\nContent-Type: application/json\r\n\r\n"
time="2021-02-01T00:50:31-07:00" level=debug msg="Response:  &{404 Not Found 404 HTTP/2.0 2 0 map[Content-Length:[79] Content-Type:[application/json] Date:[Mon, 01 Feb 2021 07:51:12 GMT] Via:[1.1 36fc63dc4f635a9ea30a821a42657dd4.cloudfront.net (CloudFront)] X-Amz-Apigw-Id:[aDjlmEWNoAMFkpw=] X-Amz-Cf-Id:[RlIsi-QIMevLu6ksu5_tJB0W7r3-UZwfbMP2wpIKHUgcMvAectMzkg==] X-Amz-Cf-Pop:[LAX3-C2] X-Amzn-Errortype:[NotFoundException] X-Amzn-Requestid:[ac3ee942-1fed-4ce4-b1d6-3866d33e17e5] X-Cache:[Error from cloudfront]] {0xc00076fce0} 79 [] false false map[] 0xc000585700 0xc0007998c0}"
time="2021-02-01T00:50:31-07:00" level=fatal msg="[POST /leases/auth][404] postLeasesAuthNotFound "

Expected behavior

dce leases login logs into the lease without an ID present.

Additional context

The change by @eschwartz here seems to indicate that it should be possible to login without the ID. https://github.com/Optum/dce-cli/blame/3aa9d1b4db7284abb3d37d429a6ed6f64d9218cb/CHANGELOG.md#L11

The swagger generated code also imply that a /leases/auth endpoint existed in the swagger documents it was generated from:

PostLeasesAuth creates lease authentication by for the requesting user s active lease

But it doesn't seem that the current master of the swagger API has this defined: https://github.com/Optum/dce/blob/f4a1c1cee56cd7daa01ecca7f35aaec7fe4199b1/modules/swagger.yaml

Improve messaging for usage with no records

Version information

0.4.0
Darwin redacted.example.com. 18.7.0 Darwin Kernel Version 18.7.0: Thu Jan 23 06:52:12 PST 2020; root:xnu-4903.278.25~1/RELEASE_X86_64 x86_64
go version go1.13.8 darwin/amd64

Describe the bug

When I run the following command:

$ ./dce usage --start-date 1 --end-date `date +%s`     
err:  json: cannot unmarshal array into Go value of type operations.GetUsageOKBody
exit status 1

This looks like an unintended error. Expect an empty array

To Reproduce

Expected behavior

Additional context

Update dce.yml with backend configuration

When creating a new TF state backend, the DCE CLI should commit the backend configuration to the dce.yml file. Otherwise, users won't be able to reuse that same backend configuration

As as user, I should be able to deploy the DCE TF module multiple times against the same state file. I should be able to commit my dce.yml config to version control, and allow others on my team to deploy against the same TF state.

See related #15

Allow printing lease login URL without having to open a browser

Is your feature request related to a problem? Please describe.
dce leases login --open-browser requires a browser to be configured in the environment and will open in the default session of the default browser.

The "default" might not work for everyone or it could be broken.

Sometimes you may not want to open the console in your default browser and maybe in another profile with some other browser or browsing container. Or maybe your xdg-open or similar utility is busted like out of the box with WSL.

I've seen other utilities like Google ones offer a fallback to visit a URL printed out if an interactive web browser can't be called open for whatever reason.

Describe the solution you'd like
Have an option to print out the URL to be opened with dce leases login --open-browser and not actually open the browser.

Describe alternatives you've considered
I don't know where to search or what. This operation seems to differ by platform too. For me, I've setup xdg-open in WSL2 to actually open correctly to Windows. This might not work for other user setups.

Additional context

Alternative to template strings in CLI flags

Having to pass template string (eg.budget notification emails) as CLI flags is not a great UX. Users may have long-ish emails, with all sorts of hard-to-escape-in-bash characters.

I'd like to see options for:

  • passing in from a file (eg --whatever-template file://my-template.tmpl)
  • Configuring inline in my dce.yml file

Build and document 'dce upgrade' functionality

  • Add a flag to dce system deploy that specifies the version of dce to deploy.
  • Default is to deploy latest version
  • Add a quick start for updating dce given you have an old version deployed
  • Consider how to deal with incompatibilities between different versions of the cli and dce backend

Accept any tfvars

Would like to be able to configure terraform vars, outside those supplied by cli commands. I would also like to configure these in yaml, so I can more easily commit them as code to version control.

Maybe a dce.yaml that looks like:

terraform:
  vars:
    # can pass in any var supported by the DCE TF module.
     namespace: "local"
     budget_notification_emails: ["[email protected]"]

After installing v0.5.0, the "dce version" still shows up as v0.4.0

Version

  • DCE CLI v0.4.0
  • Darwin C02XC78CJGH5 17.7.0 Darwin Kernel Version 17.7.0: Sun Jun 2 20:31:42 PDT 2019; root:xnu-4570.71.46~1/RELEASE_X86_64 x86_64
  • go version go1.14.2 darwin/amd64
  • Terraform v0.12.20

Describe the bug
Trying to upgrade v0.4.0 to v0.5.0.
When installing DCE CLI with version 0.5.0, the dce version in terminal still appears as 0.4.0.

To Reproduce

Steps to reproduce the behavior:

  1. When I type this Command, I get the following output

Download the zip file

wget https://github.com/Optum/dce-cli/releases/download/**v0.5.0**/dce_darwin_amd64.zip

Unzip to a directory on your path

unzip dce_darwin_amd64.zip -d /usr/local/bin
~ dce version **0.4.0**

Expected behavior
Version should be 0.5.0 but shows 0.4.0

ARM Releases

Would be great if ARM would be part of the releases.

DCE Leases - Cost Center

Is your feature request related to a problem? Please describe.

When I lease an account from pool, I need additional information like "Cost Center". After lease end Iยดll get this information "cost center" to send to department responsible that used an account leased.

Describe the solution you'd like
My suggestion when you request an account using the command bellow, would accept the parameter "--cost-center" and store on table "usage".

dce leases create --budget-amount 10.0 --budget-currency USD --email [email protected] --principal-id quickstartuser --cost-center 4500

Authentication with Cognito

I want to be able to authenticate as a DCE user (not admin), via an external IDP.

User Flow:

  • CLI command initiates auth flow
$ dce auth
> Opening a browser to authenticate....
> Enter Login Code: 
  • CLI grabs location of DCE API from dce.yml
    • This config is either populated on running dce system deploy, or manually configured by end user
  • CLI opens browser window at https://<dce_api_url>/auth
  • /auth uses Cognito JS SDK (client-side) to redirect user to IDP login page*
  • IDP prompts user for username/password
  • IDP redirects back to /auth endpoint, with ?code= query param
  • /auth endpoint converts the ?code= param to a JWT, using Cognito JS SDK**
  • /auth endpoint converts the JWT to an STS token, using the Cognito JS SDK**
  • /auth endpoint encodes the STS token as base64
  • /auth endpoint displays base64 token to user, and copies to clipboard
  • User pastes the token back into their CLI prompt
  • CLI saves the token to dce.yaml for future use

For future CLI commands...

  • CLI decodes STS token, and uses in sigv4 auth to DCE API endpoints
  • API Gateways is able to inspect the STS token and associate it with a Cognito identity. API GW includes cognito metadata in API Gateway Event object passed to lambdas***

Other Considerations

  • If a CLI user is using AWS CLI creds (eg. from ~/.aws/credentials), they shouldn't need to login via Cognito. They should be able to continue using basic IAM Auth, and be treated as an admin user.

* note that /auth endpoint is not yet implemented. Will be completed in main DCE repo
** Alternatively, /auth endpoint could just grab the ?code= param and pass it back to the CLI, and the CLI could do the code->JWT->STS conversion
*** ...or so we think. See /leases/auth code for inspecting cognito data in API GW events


BONUS POINTS: Auto-Auth

CLI should have a pre-command hook, which authenticates users if they aren't already authenticated.

So, I should be able to run dce leases login, go through my IDP login, and get access to my AWS account. (I don't want to run dce auth and then also dce leases login.

Tasks

For github.com/Optum/dce:

  • Add /auth endpoint, with client side Cognito JS SDK code
  • Verify that STS tokens from Cognito get passed through into the API GW event, the way we think they do
  • Test IRL, with a real IDP
    • Identity any areas where additional configuration is necessary
  • Document how to integrate IDP/Cognito with DCE

For github.com/Optum/dce-cli

  • Update dce auth to open /auth endpoint
  • dce auth command prompts for code, and saves to dce.yml
  • Use API code from dce auth for other CLI commands

Accept TF backend configuration in dce.yml

Would like to be able to provide my own TF backend configuration, and commit it as code to my configuration file

eg

terraform:
  backend:
     type: "S3"
     bucket: "my-bucket"
     key: "terraform.tfstate"
     dynamodb_lock_table: "LockDB"

Also, If the DCE CLI creates a TF backend for me, it should update the dce.yml file with the backend configuration, so it can be reused as committed as code.

Flag and Arg Input validation

Inputs that need validation:

  • dce system deploy --namespace - Must follow s3 bucket naming restrictions (i.e. lowercase and not too long)

dce -v, --version

As a user, I would like a CLI command that returns the current version of the CLI that I am using. Something like:

$ dce -v
=> v0.2.0

Maybe it could also include the version of DCE that I have deployed as well:

$ dce -v
=> DCE CLI: v0.2.0
=> DCE: vX.Y.Z

Use AWS Creds from ~/.aws/credentials

I would like the DCE CLI to load my regular AWS CLI creds (eg. from ~/.aws/credentials), instead of having to reconfigure those creds in my dce.yaml file

Command for accessing terraform outputs

The DCE terraform module exposes a number of outputs, which are in some cases necessary for basic usage of the system. For example, the url of the API gateway is accessible from terraform output api_url. Another example is the SNS topic ARNs for lifecycle events (eg. lease-created, etc).

It would be nice if the DCE CLI provided a way to access these values.
Maybe something like:

dce system get <output name>

Add cli autocompletions

As a dce user, I would like the cli to autocomplete commands, so that I can enter them more quickly and accurately.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.