Skip to content

Commit ffee99b

Browse files
Merge pull request circleci#3662 from circleci/michelle-luna-patch-7
update gh-bb-integration doc
2 parents 1ff1fc1 + 6f9f7bf commit ffee99b

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

jekyll/_cci2/gh-bb-integration.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ Integrated status also appears on the pull request screen, to show that all test
5454
5555
![Status Badge After PR]({{ site.baseurl }}/assets/img/docs/status_check.png)
5656
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+
5769
## Enable Your Project to Check Out Additional Private Repositories
5870
5971
If your testing process refers to multiple repositories, CircleCI will need a
@@ -92,7 +104,7 @@ Permission denied (publickey).
92104
## Controlling Access Via a Machine User
93105
94106
For fine-grained access to multiple repositories,
95-
consider creating a machine user
107+
it is best practice to create a machine user
96108
for your CircleCI projects.
97109
A [machine user](https://developer.github.com/v3/guides/managing-deploy-keys/#machine-users) is a GitHub user
98110
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
210222
211223
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.
212224
213-
### Creating a GitHub User Key
225+
### Creating a GitHub Deploy Key
214226
{:.no_toc}
215227
216228
In this example,
@@ -306,7 +318,7 @@ For this reason, a deploy key isn't sufficiently powerful for projects with addi
306318

307319
### What about security?
308320

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.
310322

311323
**Isn't there a difference between deploy keys and user keys?**
312324

0 commit comments

Comments
 (0)