Skip to content
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

Validate configured hostnames against certificates #1802

Open
jhiemstrawisc opened this issue Dec 6, 2024 · 0 comments
Open

Validate configured hostnames against certificates #1802

jhiemstrawisc opened this issue Dec 6, 2024 · 0 comments
Assignees
Labels
cache Issue relating to the cache component director Issue relating to the director component enhancement New feature or request error messages Improvements to error messages origin Issue relating to the origin component registry Issue relating to the registry component
Milestone

Comments

@jhiemstrawisc
Copy link
Member

Pelican has several configuration parameters that configure server hostnames:

  • Server.Hostname --> default is os.Hostname()
  • Origin.Url --> the hostname+port for an origin's XRootd component. Default of https://${Server.Hostname}:${Origin.Port}
  • Cache.Url --> the hostname+port for a cache's XRootd component. Default of https://${Server.Hostname}:${Cache.Port}
  • Server.ExternalWebUrl --> The hostname+port for any Pelican server's WebUI. Default of https://${Server.Hostname}:${Server.WebPort}

When incoming HTTPS requests reach a Pelican server, they use the configured TLS certificate to validate that the connection is authentic. However, we currently don't prevent users from configuring their service with a hostname that isn't valid for the provided certificate.

This was observed when an origin tried to perform a self test against its own mis-configured hostname, resulting in remote error: tls: bad certificate because it didn't have a valid certificate for the hostname.

Instead of leaving users scratching their head over what this cryptic message means, we should be able to validate each of the aforementioned config params against the configured certificate. If there's a mismatch, we should either error out or make the issue obvious with a warning. If we decide to make this a terminal error, we should double check it doesn't break any other abilities to spin up quick test servers.

@jhiemstrawisc jhiemstrawisc added enhancement New feature or request cache Issue relating to the cache component origin Issue relating to the origin component director Issue relating to the director component registry Issue relating to the registry component error messages Improvements to error messages labels Dec 6, 2024
@jhiemstrawisc jhiemstrawisc added this to the v7.13.0 milestone Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cache Issue relating to the cache component director Issue relating to the director component enhancement New feature or request error messages Improvements to error messages origin Issue relating to the origin component registry Issue relating to the registry component
Projects
None yet
Development

No branches or pull requests

2 participants