-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Adding notary docs #483
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
Adding notary docs #483
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Notary server and signer cooperatively handle signing and distribution of notary repositories. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# How to use this repository | ||
|
||
The Notary respository contains two distinct applications, Notary Server, and Notary Signer. The images for these applications are tagged "server-\*" and "signer-\*" respectively. While the server can be configured to run entirely in memory, this configuration is not be appropriate for a production deployment so you should expect to run both a server *and* and signer. | ||
|
||
Ensure that the images you are running have similar version tags. That is, if you are running the server-0.2.0 tag, you should also be running the similar signer-0.2.0 tag. Running different versions of the server and signer will never be a supported configuration. | ||
|
||
# Notary Server | ||
|
||
The Notary server manages JSON formatted TUF (The Update Framework) metadata for Notary clients and the docker command line tool's Docker Content Trust features. It requires a companion Notary signer instance and a MySQL (or MariaDB) database. | ||
|
||
## How to use this image | ||
|
||
The following sample configuration is included in the image: | ||
|
||
{ | ||
"server": { | ||
"http_addr": ":4443", | ||
"tls_key_file": "/certs/notary-server.key", | ||
"tls_cert_file": "/certs/notary-server.crt" | ||
}, | ||
"trust_service": { | ||
"type": "remote", | ||
"hostname": "notarysigner", | ||
"port": "7899", | ||
"tls_ca_file": "/certs/root-ca.crt", | ||
"key_algorithm": "ecdsa", | ||
"tls_client_cert": "/certs/notary-server.crt", | ||
"tls_client_key": "/certs/notary-server.key" | ||
}, | ||
"logging": { | ||
"level": "info" | ||
}, | ||
"storage": { | ||
"backend": "mysql", | ||
"db_url": "server@tcp(mysql:3306)/notaryserver?parseTime=True" | ||
} | ||
} | ||
|
||
The components you *must* provide are the certificates and keys, and the links for the `notarysigner` and `mysql` hostnames. The `root-ca.crt` file enables the Notary server to identify valid signers, which it communicates with over mutual TLS using a GRPC interface. The `notary-server.crt` and`notary-server.key` are used to identify this service to both external clients, and signer instances. All the certificate and key files must be readable by the notary user which is created inside the container and owns the notary-server process. | ||
|
||
If you require a different configuration, you should wrap this image with your own Dockerfile. | ||
|
||
For more details on how to configure your Notary server, please read the[docs](https://github.com/docker/notary/blob/master/docs/notary-server-config.md). | ||
|
||
# Notary Signer | ||
|
||
The Notary signer is a support service for the Notary server. It manages private keys and performs all signing operations. It requires a MySQL (or MariaDB) database. | ||
|
||
## How to use this image | ||
|
||
The following sample configuration is included in the image: | ||
|
||
{ | ||
"server": { | ||
"http_addr": ":4444", | ||
"grpc_addr": ":7899", | ||
"tls_cert_file": "/certs/notary-signer.crt", | ||
"tls_key_file": "/certs/notary-signer.key", | ||
"client_ca_file": "/certs/notary-server.crt" | ||
}, | ||
"logging": { | ||
"level": "info" | ||
}, | ||
"storage": { | ||
"backend": "mysql", | ||
"db_url": "signer@tcp(mysql:3306)/notarysigner?parseTime=True" | ||
} | ||
} | ||
|
||
The components you *must* provide are the certificates and keys, and the link for the `mysql` hostname. The `notary-server.crt` file enables the Notary signer to identify valid servers, which it communicates with over mutual TLS using a GRPC interface. The `notary-server.crt` and`notary-server.key` are used to identify this service to both external clients, and signer instances. All the certificate and key files must be readable by the notary user which is created inside the container and owns the notary-signer process. | ||
|
||
If you require a different configuration, you should wrap this image with your own Dockerfile. | ||
|
||
For more details on how to configure your Notary signer, please read the [docs](https://github.com/docker/notary/blob/master/docs/notary-signer-config.md). | ||
|
||
## Database Migrations | ||
|
||
Notary server and signer both use the [migrate tool](https://github.com/mattes/migrate) to manage database updates. The migration files can be found [here](https://github.com/docker/notary/tree/master/migrations/) and are an ordered list of plain SQL files. The migrate tool manages schema versions to ensure that migrations start and end at the correct point. | ||
|
||
We strongly recommend you create separate databases and users with restricted permissions such that the server cannot access the signer's database and vice versa. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
View [license information](https://github.com/docker/notary/blob/master/LICENSE) for the software contained in this image. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to mention about permissions on these cert files since the
notary
user in the container will need to be able to read them.(Edit: Whoops, somehow the line changed so my comment is a little lower than expected. 😮 https://github.com/docker-library/docs/pull/483/files#diff-6e3863e08e7f11347882e91de34ee81cR41)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a note to the paragraphs below the sample configs where I talk about "You must provide keys/certs"