Skip to content

Commit

Permalink
Updated to env:// instead of direct token
Browse files Browse the repository at this point in the history
  • Loading branch information
JKetelaar committed Apr 26, 2023
1 parent 4faf8ea commit 57f762c
Show file tree
Hide file tree
Showing 10 changed files with 1,029 additions and 27 deletions.
4 changes: 2 additions & 2 deletions cmd/install.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
Copyright © 2022 Intercube <[email protected]>
Copyright © 2023 Intercube <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
4 changes: 2 additions & 2 deletions cmd/intercube/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
Copyright © 2022 Intercube <[email protected]>
Copyright © 2023 Intercube <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
10 changes: 7 additions & 3 deletions cmd/login.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
Copyright © 2022 Intercube <[email protected]>
Copyright © 2023 Intercube <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down Expand Up @@ -70,6 +70,10 @@ var loginCmd = &cobra.Command{
token, _ = x.(string)
}

err = os.Setenv("BOUNDARY_TOKEN", token)
if err != nil {
panic(err)
}
client.SetToken(token)

scopes := scopes.NewClient(client)
Expand Down Expand Up @@ -146,7 +150,7 @@ var loginCmd = &cobra.Command{
"-addr="+boundaryUrl,
"-username="+sshUsername,
"-host-id="+hostsList[i].Id,
"-token="+token,
"-token=env://BOUNDARY_TOKEN",
)
command.Stdin = os.Stdin
command.Stdout = os.Stdout
Expand Down
4 changes: 2 additions & 2 deletions cmd/magento.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
Copyright © 2022 Intercube <[email protected]>
Copyright © 2023 Intercube <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
4 changes: 2 additions & 2 deletions cmd/map.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
Copyright © 2022 Intercube <[email protected]>
Copyright © 2023 Intercube <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
Copyright © 2022 Intercube <[email protected]>
Copyright © 2023 Intercube <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
4 changes: 2 additions & 2 deletions cmd/speedtest.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
Copyright © 2022 Intercube <[email protected]>
Copyright © 2023 Intercube <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
4 changes: 2 additions & 2 deletions cmd/sync.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
Copyright © 2022 Intercube <[email protected]>
Copyright © 2023 Intercube <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
47 changes: 37 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,45 @@ module github.com/intercube/cli
go 1.15

require (
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
github.com/briandowns/spinner v1.18.1
github.com/hashicorp/boundary/api v0.0.22
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c // indirect
github.com/briandowns/spinner v1.23.0
github.com/chzyer/readline v1.5.1 // indirect
github.com/coreos/bbolt v1.3.2 // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
github.com/hashicorp/boundary/api v0.0.36
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-kms-wrapping v0.7.1 // indirect
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/manifoldco/promptui v0.9.0
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/olekukonko/tablewriter v0.0.5
github.com/spf13/cobra v1.1.3
github.com/spf13/viper v1.10.1
github.com/tcnksm/go-httpstat v0.1.1-0.20170410140047-fae40520f4ba
github.com/zloylos/grsync v1.6.0
golang.org/x/crypto v0.0.0-20210915214749-c084706c2272 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/prometheus/tsdb v0.7.1 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/soheilhy/cmux v0.1.4 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.15.0
github.com/tcnksm/go-httpstat v0.2.0
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
github.com/zloylos/grsync v1.7.0
go.etcd.io/bbolt v1.3.2 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/term v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/grpc v1.54.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/resty.v1 v1.12.0 // indirect
)
Loading

0 comments on commit 57f762c

Please sign in to comment.