Skip to content

Server configuration and encryption pages #977

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

Open
wants to merge 1 commit into
base: 3.x-development
Choose a base branch
from

Conversation

krishnangovindraj
Copy link
Member

Goal

Document in-flight encryption and server configuration.

certificate-key: /path/to/private-key
# Optional:
ca-certificate: /path/to/ca-certificate
Copy link
Member Author

Choose a reason for hiding this comment

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

This is unused at the moment, isn't it?

Copy link
Member

Choose a reason for hiding this comment

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

Why do you think so? It is.

Server:

./typedb server ... --server.encryption.ca-certificate=/Users/georgii/work/typedb-driver/tool/test/resources/encryption/ext-grpc-root-ca.pem ...

Console:

./typedb console --address https://127.0.0.1:1729 --username admin --password password --tls-root-ca /Users/georgii/work/typedb-driver/tool/test/resources/encryption/ext-grpc-root-ca.pem

Welcome to TypeDB Console!

>> exit
λ ~/Downloads/typedb-all-mac-arm64-3.4.4/ ./typedb console --address https://127.0.0.1:1729 --username admin --password password                                                                                                 
Failed to create driver connection to server. invalid peer certificate: UnknownIssuer
Verify that the server is also configured with TLS encryption.

Copy link
Member Author

Choose a reason for hiding this comment

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

What does it do? Conceptually, it can't do anything until we've got multiple nodes.

Copy link
Member

Choose a reason for hiding this comment

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

Huh? It gives you a custom CA authority

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but the CA is unused on the server side in TLS.

Copy link
Member

@farost farost left a comment

Choose a reason for hiding this comment

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

Good overall, left comments

You can configure a TypeDB server via two means: a YAML config file, or command line options.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
You can configure a TypeDB server via two means: a YAML config file, or command line options.
You can configure a TypeDB server via two means: a YAML config file or command line options.


See xref:{page-version}@typedb-in-flight-encryption.adoc[] for more information on encryption,
and the encryption section of <<_command_line_arguments>> below for the fields.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
and the encryption section of <<_command_line_arguments>> below for the fields.
and the encryption section of <<_command_line_arguments>> below for the configuration fields.

or available or configurable

=== Logging

You can configure the directory that TypeDB uses for server logs - see the Logging section of <<_command_line_arguments>> below.
Copy link
Member

Choose a reason for hiding this comment

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

These empty fragments "Logging... uhhh logging just go see the section below" look weird, but I also understand that we kinda want to cover all the upper-level categories of the configuration. Just a comment, idk what to do with it

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree. I just copy pasted it. I think I might split / flatten the table at the end into each section.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated to copy over the subtable into the relevant section. Please check again


[#_machine_requirements]
== Host machine configuration
Copy link
Member

Choose a reason for hiding this comment

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

Let's comment this header out if it's not ready and we don't really plan to fill it up in the coming days

Copy link
Member Author

Choose a reason for hiding this comment

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

The ulimit should still be relevant

| HTTP endpoint host and port. Cannot be the same as `server.address`. Default value: `0.0.0.0:8000`. +

| `server.authentication.token_ttl_seconds`
Copy link
Member

Choose a reason for hiding this comment

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

This should really use the same naming convention as encryption fields. Both in the docs and in the actual config. Can we reverify that everything is in sync?
I thought I had fixed it the last time, but I might've missed this one.

Copy link
Member Author

Choose a reason for hiding this comment

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

lol, it's called token-expiration-seconds

Copy link
Member

Choose a reason for hiding this comment

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

Is it called the same way in cli args? I just see it uses _ in my outdated branch, but I thought I pulled my latest config changes/ Just ensure it's actually this everywhere

certificate-key: /path/to/private-key
# Optional:
ca-certificate: /path/to/ca-certificate
Copy link
Member

Choose a reason for hiding this comment

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

Why do you think so? It is.

Server:

./typedb server ... --server.encryption.ca-certificate=/Users/georgii/work/typedb-driver/tool/test/resources/encryption/ext-grpc-root-ca.pem ...

Console:

./typedb console --address https://127.0.0.1:1729 --username admin --password password --tls-root-ca /Users/georgii/work/typedb-driver/tool/test/resources/encryption/ext-grpc-root-ca.pem

Welcome to TypeDB Console!

>> exit
λ ~/Downloads/typedb-all-mac-arm64-3.4.4/ ./typedb console --address https://127.0.0.1:1729 --username admin --password password                                                                                                 
Failed to create driver connection to server. invalid peer certificate: UnknownIssuer
Verify that the server is also configured with TLS encryption.

@krishnangovindraj krishnangovindraj force-pushed the server-configuration-krishnan branch from 7e3593a to 89dd7f0 Compare August 7, 2025 20:33
Copy link
Member Author

@krishnangovindraj krishnangovindraj left a comment

Choose a reason for hiding this comment

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

@farost , Another round please

certificate-key: /path/to/private-key
# Optional:
ca-certificate: /path/to/ca-certificate
Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but the CA is unused on the server side in TLS.

=== Logging

You can configure the directory that TypeDB uses for server logs - see the Logging section of <<_command_line_arguments>> below.
Copy link
Member Author

Choose a reason for hiding this comment

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

Updated to copy over the subtable into the relevant section. Please check again


[#_machine_requirements]
== Host machine configuration
Copy link
Member Author

Choose a reason for hiding this comment

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

The ulimit should still be relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants