Skip to content

Conversation

@t-aleksander
Copy link
Contributor

@t-aleksander t-aleksander commented Jan 7, 2026

Creates basic core certificate authority functionality.

The major parts that are missing from this PR:

  • certificate renewal/changing
  • Gateway handling (coming in part 2)

The communication is now split between the following phases:

  • Initial setup handshake, Core and Proxy exchange setup information (currently only certificates: csr in, certificate out) over HTTP (since HTTPS is not available yet). This step is skipped if: Proxy already has some certificates or Core detects that the Proxy is serving it's gRPC traffic over HTTPS already.
  • After the 1st phase is completed (or skipped), both components switch to HTTPS and continue operating as usual (2nd phase)
  • If for any reason one of the components is already on the 2nd phase but the other one tries to initiate the 1st phase, the component on the 2nd phase sends message informing that it does not require further configuration and the initiating component skips the 1st phase.

TODO:

  • Update protobufs

@t-aleksander t-aleksander linked an issue Jan 7, 2026 that may be closed by this pull request
22 tasks
}
}

pub fn der_to_pem(der: &[u8], label: PemLabel) -> Result<String, CertificateError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

rcgen::Certificate has methods to convert itself to DER or PEM. Maybe use those?

}
}

fn endpoint(&self, with_tls: bool) -> Result<Endpoint, ProxyError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about endpoint(&self, scheme: &str)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Certificate Authority in core

3 participants