@@ -35,15 +35,9 @@ To log into a server through the bastion, use one of the following methods:
35
35
ssh <username>@servername.infra.rust-lang.org
36
36
```
37
37
38
- Please remember the bastion server only allows connections from a small list of
39
- IP addresses. Infra team members with AWS access can change the whitelist, but
40
- it's good practice to either have your own bastion server or a static IP
41
- address.
42
-
43
38
The SSH keys authorized to log into each account are stored in the [simpleinfra
44
39
repository][keys]. Additionally, people with sensitive 1password access can use
45
- the master key stored in the vault to log into every account, provided their
46
- connection comes from any whitelisted IP.
40
+ the master key stored in the vault to log into every account.
47
41
48
42
## Common maintenance procedures
49
43
@@ -55,55 +49,10 @@ the [Ansible playbook][ansible] adding the user to the list of unprivileged
55
49
users. Please leave a comment clarifying which servers the user will have
56
50
access to.
57
51
58
- Once that's done [apply the playbook][ansible-apply] and [add a new whitelisted
59
- IP address](#adding-a-whitelisted-ip).
60
-
61
- ## Editing a whitelisted IP
62
-
63
- Due to privacy reasons, all the static IP addresses of team members with access
64
- to the bastion are stored on [AWS SSM Parameter Store][ssm] instead of public
65
- git repositories.
66
- When running the following commands, replace `USERNAME` and `IP_ADDRESS` with the proper values.
67
-
68
- ### Adding a whitelisted IP
69
-
70
- 1. Run:
71
- ```
72
- aws ssm put-parameter --type String --name "/prod/bastion/allowed-ips/USERNAME" --value "IP_ADDRESS/32" --region us-west-1
73
- ```
74
- 2. Add the username to the list in
75
- [`terraform/bastion/firewall.tf`][allowed-ips] (local variable
76
- `allowed_users`).
77
- 3. [apply the Terraform configuration][terraform-apply].
78
-
79
- ### Updating a whitelisted IP
80
-
81
- 1. Run:
82
-
83
- ```
84
- aws ssm put-parameter --overwrite --type String --name "/prod/bastion/allowed-ips/USERNAME" --value "IP_ADDRESS/32" --region us-west-1
85
- ```
86
-
87
- 2. [apply the Terraform configuration][terraform-apply].
88
-
89
- ### Removing a whitelisted IP
90
-
91
- 1. Run:
92
-
93
- ```
94
- aws ssm delete-parameter --name "/prod/bastion/allowed-ips/USERNAME" --region us-west-1
95
- ```
96
-
97
- 2. Remove the username from the list in
98
- [`terraform/bastion/firewall.tf`][allowed-ips] (local variable
99
- `allowed_users`).
100
- 3. [apply the Terraform configuration][terraform-apply].
52
+ Once that's done [apply the playbook][ansible-apply].
101
53
102
54
[ansible]: https://github.com/rust-lang/simpleinfra/blob/master/ansible/playbooks/bastion.yml
103
55
[terraform]: https://github.com/rust-lang/simpleinfra/tree/master/terraform/bastion
104
56
[grafana]: https://grafana.rust-lang.org/d/rpXrFfKWz/instance-metrics?orgId=1&var-instance=bastion.infra.rust-lang.org:9100
105
57
[keys]: https://github.com/rust-lang/simpleinfra/tree/master/ansible/roles/common/files/ssh-keys
106
58
[ansible-apply]: https://github.com/rust-lang/simpleinfra/blob/master/ansible/README.md#executing-a-playbook
107
- [ssm]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html
108
- [allowed-ips]: https://github.com/rust-lang/simpleinfra/blob/master/terraform/bastion/firewall.tf
109
- [terraform-apply]: https://github.com/rust-lang/simpleinfra/tree/master/terraform#applying-the-configuration
0 commit comments