Skip to content

Document env vars security #2534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 31, 2018
Merged

Document env vars security #2534

merged 9 commits into from
Jul 31, 2018

Conversation

smart-alek
Copy link
Contributor

Description

This PR adds information about environment variable security to the Security document.

Reasons

In #2496, a user requested more information about how environment variables are secured.

Context

Fixes #2496 and resolves this JIRA issue.

@smart-alek smart-alek added the undocumented missing information label Jul 27, 2018
@smart-alek smart-alek self-assigned this Jul 27, 2018
Copy link
Contributor

@tito-villalobos tito-villalobos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single word change but important for accuracy.

@@ -18,7 +18,7 @@ Security is our top priority at CircleCI, we are proactive and we act on securit
## Encryption
CircleCI uses HTTPS or SSH for all networking in and out of our service including from the browser to our services application, from the services application to your builder fleet, from our builder fleet to your source control system, and all other points of communication. In short, none of your code or data travels to or from CircleCI without being encrypted unless you have code in your builds that does so at your discretion. Operators may also choose to go around our SSL configuration or not use TLS for communicating with underlying systems.

The nature of CircleCI is that our software has access to your code and whatever data that code interacts with. All jobs on CircleCI run in a sandbox (specifically, a Docker container or on-demand VM container) that stands alone from all other builds and is not accessible from the Internet or from your own network. The build container pulls code via git over SSH. Your particular test suite or job configurations may call out to external services or integration points within your network, and the response from such calls will be pulled into your jobs and used by your code at your discretion. After a job is complete the container that ran the job is destroyed and rebuilt. All environment variables you store inside CircleCI are encrypted at rest and sent to your job's containers using SSH.
The nature of CircleCI is that our software has access to your code and whatever data that code interacts with. All jobs on CircleCI run in a sandbox (specifically, a Docker container or on-demand VM container) that stands alone from all other builds and is not accessible from the Internet or from your own network. The build container pulls code via git over SSH. Your particular test suite or job configurations may call out to external services or integration points within your network, and the response from such calls will be pulled into your jobs and used by your code at your discretion. After a job is complete the container that ran the job is destroyed and rebuilt. All environment variables are stored using [Hashicorp Vault](https://www.vaultproject.io/). Environment variables are encrypted using AES256-GCM96 and are unavailable to CircleCI employees.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/stored/encrypted/

Single word change but important for accuracy.

Detailed explanation for internal understanding:
Vault does secrets management in a number of different ways. It can store secrets directly, be an encryption service, integrate with aws security features, generate one-time-passwords, etc. We are looking to leverage different features of Vault for different CCI features.

For user environment variables, we use the Vault encryption service (they call it the "transit secret store"). It's technically possible to "store customer environment variables in vault", but we chose this approach because Postgres is better at scaling for large volumes of data.

Thus, we "encrypt environment variables using vault" and store the resulting ciphertext in postgres.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tito-villalobos Is that Postgres database in GPC or AWS?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of our production data stores are in AWS.

@tadwhitaker
Copy link
Contributor

LGTM

Copy link
Contributor

@endocrimes endocrimes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of those comments don't strictly apply to the exact change, but are important for accuracy IMO.

@@ -18,7 +18,7 @@ Security is our top priority at CircleCI, we are proactive and we act on securit
## Encryption
CircleCI uses HTTPS or SSH for all networking in and out of our service including from the browser to our services application, from the services application to your builder fleet, from our builder fleet to your source control system, and all other points of communication. In short, none of your code or data travels to or from CircleCI without being encrypted unless you have code in your builds that does so at your discretion. Operators may also choose to go around our SSL configuration or not use TLS for communicating with underlying systems.

The nature of CircleCI is that our software has access to your code and whatever data that code interacts with. All jobs on CircleCI run in a sandbox (specifically, a Docker container or on-demand VM container) that stands alone from all other builds and is not accessible from the Internet or from your own network. The build container pulls code via git over SSH. Your particular test suite or job configurations may call out to external services or integration points within your network, and the response from such calls will be pulled into your jobs and used by your code at your discretion. After a job is complete the container that ran the job is destroyed and rebuilt. All environment variables you store inside CircleCI are encrypted at rest and sent to your job's containers using SSH.
The nature of CircleCI is that our software has access to your code and whatever data that code interacts with. All jobs on CircleCI run in a sandbox (specifically, a Docker container or on-demand VM container) that stands alone from all other builds and is not accessible from the Internet or from your own network. The build container pulls code via git over SSH. Your particular test suite or job configurations may call out to external services or integration points within your network, and the response from such calls will be pulled into your jobs and used by your code at your discretion. After a job is complete the container that ran the job is destroyed and rebuilt. All environment variables are stored using [Hashicorp Vault](https://www.vaultproject.io/). Environment variables are encrypted using AES256-GCM96 and are unavailable to CircleCI employees.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"or on-demand VM container" should be "or an ephemeral VM". Virtual machines are not containers.

@@ -18,7 +18,7 @@ Security is our top priority at CircleCI, we are proactive and we act on securit
## Encryption
CircleCI uses HTTPS or SSH for all networking in and out of our service including from the browser to our services application, from the services application to your builder fleet, from our builder fleet to your source control system, and all other points of communication. In short, none of your code or data travels to or from CircleCI without being encrypted unless you have code in your builds that does so at your discretion. Operators may also choose to go around our SSL configuration or not use TLS for communicating with underlying systems.

The nature of CircleCI is that our software has access to your code and whatever data that code interacts with. All jobs on CircleCI run in a sandbox (specifically, a Docker container or on-demand VM container) that stands alone from all other builds and is not accessible from the Internet or from your own network. The build container pulls code via git over SSH. Your particular test suite or job configurations may call out to external services or integration points within your network, and the response from such calls will be pulled into your jobs and used by your code at your discretion. After a job is complete the container that ran the job is destroyed and rebuilt. All environment variables you store inside CircleCI are encrypted at rest and sent to your job's containers using SSH.
The nature of CircleCI is that our software has access to your code and whatever data that code interacts with. All jobs on CircleCI run in a sandbox (specifically, a Docker container or on-demand VM container) that stands alone from all other builds and is not accessible from the Internet or from your own network. The build container pulls code via git over SSH. Your particular test suite or job configurations may call out to external services or integration points within your network, and the response from such calls will be pulled into your jobs and used by your code at your discretion. After a job is complete the container that ran the job is destroyed and rebuilt. All environment variables are stored using [Hashicorp Vault](https://www.vaultproject.io/). Environment variables are encrypted using AES256-GCM96 and are unavailable to CircleCI employees.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The build container pulls code via git over SSH." should be "The build agent pulls code via git over SSH."

@@ -18,7 +18,7 @@ Security is our top priority at CircleCI, we are proactive and we act on securit
## Encryption
CircleCI uses HTTPS or SSH for all networking in and out of our service including from the browser to our services application, from the services application to your builder fleet, from our builder fleet to your source control system, and all other points of communication. In short, none of your code or data travels to or from CircleCI without being encrypted unless you have code in your builds that does so at your discretion. Operators may also choose to go around our SSL configuration or not use TLS for communicating with underlying systems.

The nature of CircleCI is that our software has access to your code and whatever data that code interacts with. All jobs on CircleCI run in a sandbox (specifically, a Docker container or on-demand VM container) that stands alone from all other builds and is not accessible from the Internet or from your own network. The build container pulls code via git over SSH. Your particular test suite or job configurations may call out to external services or integration points within your network, and the response from such calls will be pulled into your jobs and used by your code at your discretion. After a job is complete the container that ran the job is destroyed and rebuilt. All environment variables you store inside CircleCI are encrypted at rest and sent to your job's containers using SSH.
The nature of CircleCI is that our software has access to your code and whatever data that code interacts with. All jobs on CircleCI run in a sandbox (specifically, a Docker container or on-demand VM container) that stands alone from all other builds and is not accessible from the Internet or from your own network. The build container pulls code via git over SSH. Your particular test suite or job configurations may call out to external services or integration points within your network, and the response from such calls will be pulled into your jobs and used by your code at your discretion. After a job is complete the container that ran the job is destroyed and rebuilt. All environment variables are stored using [Hashicorp Vault](https://www.vaultproject.io/). Environment variables are encrypted using AES256-GCM96 and are unavailable to CircleCI employees.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of our production data stores are in AWS.

@@ -42,6 +42,8 @@ Do not add secrets or keys inside the `.circleci/config.yml` file.
The full text of `config.yml` is visible
to developers with access to your project on CircleCI.
Store secrets or keys in [project](#setting-an-environment-variable-in-a-project) or [context]({{ site.baseurl }}/2.0/contexts/) settings in the CircleCI app.
For more information,
see the ["Encryption" section]({{ site.baseurl }}/2.0/security/#encryption) of the "Security" document.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove quotes on Encryption

@smart-alek smart-alek merged commit 615397b into master Jul 31, 2018
@smart-alek smart-alek deleted the document-env-vars-security branch July 31, 2018 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
undocumented missing information
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Environment variables could use more text in the "Security Features" doc
5 participants