You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jekyll/_cci2/gh-bb-integration.md
+15-3Lines changed: 15 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,18 @@ Integrated status also appears on the pull request screen, to show that all test
54
54
55
55

56
56
57
+
## Best Practices for Keys
58
+
59
+
- Use Deploy Keys whenever possible.
60
+
- When Deploy Keys cannot be used, Machine User Keys must be used, and have their access restricted to the most limited set of repos and permissions necessary.
61
+
- Never use non-Machine user keys (keys should be associated with the build, not with a specific person).
62
+
- You must rotate the Deploy or User key as part of revoking user access to that repo.
63
+
1. After revoking the user’s access in github, delete keys in GitHub.
64
+
2. Delete the keys in the CircleCI project.
65
+
3. Regenerate the keys in CircleCI project.
66
+
- Ensure no developer has access to a build in a repo with a User Key that requires more access than they have.
67
+
68
+
57
69
## Enable Your Project to Check Out Additional Private Repositories
58
70
59
71
If your testing process refers to multiple repositories, CircleCI will need a
@@ -92,7 +104,7 @@ Permission denied (publickey).
92
104
## Controlling Access Via a Machine User
93
105
94
106
For fine-grained access to multiple repositories,
95
-
consider creating a machine user
107
+
it is best practice to create a machine user
96
108
for your CircleCI projects.
97
109
A [machine user](https://developer.github.com/v3/guides/managing-deploy-keys/#machine-users) is a GitHub user
98
110
that you create for running automated tasks.
@@ -210,7 +222,7 @@ If you want to push to the repository from your builds, you will need a deployme
210
222
211
223
A user key is a user-specific SSH key. Your VCS has the public key, and CircleCI stores the private key. Possession of the private key gives the ability to act as that user, for purposes of 'git' access to projects.
212
224
213
-
### Creating a GitHub User Key
225
+
### Creating a GitHub Deploy Key
214
226
{:.no_toc}
215
227
216
228
In this example,
@@ -306,7 +318,7 @@ For this reason, a deploy key isn't sufficiently powerful for projects with addi
306
318
307
319
### What about security?
308
320
309
-
The private keys of the checkout keypairs CircleCI generates never leave the CircleCI systems (only the public key is transmitted to GitHub) and are safely encrypted in storage. However, since they are installed into your build containers, any code that you run in CircleCI can read them.
321
+
The private keys of the checkout keypairs CircleCI generates never leave the CircleCI systems (only the public key is transmitted to GitHub) and are safely encrypted in storage. However, since the keys are installed into your build containers, any code that you run in CircleCI can read them. Likewise, developers that can SSH in will have direct access to this key.
310
322
311
323
**Isn't there a difference between deploy keys and user keys?**
0 commit comments