Skip to content

Commit

Permalink
improved readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanholsteijn committed Nov 26, 2021
1 parent f73eff9 commit 66ab6b1
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ target_cluster = {
}
## DNS managed zone accessible from the public internet
dns_managed_zone = "google-binx-dev"
dns_managed_zone = "my-managed-zone"
accessors = [
"user:[email protected]",
]
Expand All @@ -50,6 +50,20 @@ $ terraform init
$ terraform apply
```

After the apply, the required IAP proxy command is printed:
```
iap_proxy_command = <<EOT
simple-iap-proxy \
--rename-auth-header \
--target-url https://iap-proxy.my.cloud.dev \
--iap-audience 1234567890-j9onig1ofcgle7iogv8fceu04v8hriuv.apps.googleusercontent.com \
--service-account [email protected] \
--certificate-file server.crt \
--key-file server.key
EOT
```

## start the IAP proxy
To start the IAP proxy, you need a certificate. To generate a self-signed certificate, type:

Expand All @@ -62,17 +76,10 @@ $ openssl req -new -x509 -sha256 \
-days 3650 \
-out server.crt
```
Now you can start the proxy, type:
Now you can start the proxy, by copying the outputted command:

```shell-terminal
$ go install github.com/binxio/[email protected]
$ simple-iap-proxy \
--target-url $target_url \
--key-file server.key \
--certificate-file server.crt \
--rename-auth-header \
--audience $audience \
--service-account $service_account &
```
The reason for the self-signed certificate is that kubectl will not send the credentials over HTTP.

Expand Down

0 comments on commit 66ab6b1

Please sign in to comment.