Skip to content

[CTFE] Add a /log.v3.json endpoint to help satisfy a requirement of the Chrome CT Log Policy#1703

Merged
phbnf merged 9 commits intogoogle:masterfrom
robstradling:get_info_json
Jun 20, 2025
Merged

[CTFE] Add a /log.v3.json endpoint to help satisfy a requirement of the Chrome CT Log Policy#1703
phbnf merged 9 commits intogoogle:masterfrom
robstradling:get_info_json

Conversation

@robstradling
Copy link
Copy Markdown
Contributor

@robstradling robstradling commented May 30, 2025

Per this announcement, the Chrome CT Log Policy now requires log operators to publish various metadata for each log in a JSON object, either pasted directly into the log's inclusion bug or available via a URL.

This PR adds a /log.v3.json endpoint to CTFE to help satisfy this requirement.

Checklist

@robstradling robstradling changed the title [CTFE] Add a get-info endpoint to help satisfy a requirement of the Chrome CT Log Policy [CTFE] Add a get-metadata endpoint to help satisfy a requirement of the Chrome CT Log Policy Jun 2, 2025
@robstradling robstradling changed the title [CTFE] Add a get-metadata endpoint to help satisfy a requirement of the Chrome CT Log Policy [CTFE] Add a /log.v3.json endpoint to help satisfy a requirement of the Chrome CT Log Policy Jun 3, 2025
@robstradling robstradling marked this pull request as ready for review June 3, 2025 14:08
@robstradling robstradling requested a review from a team as a code owner June 3, 2025 14:08
@robstradling robstradling requested review from mhutchinson and removed request for a team June 3, 2025 14:08
@roger2hk
Copy link
Copy Markdown
Contributor

roger2hk commented Jun 3, 2025

/gcbrun

@robstradling
Copy link
Copy Markdown
Contributor Author

FYI, we've deployed the code changes in this PR to all of Sectigo's logs.
Example: https://tiger2027h1.ct.sectigo.com/log.v3.json

@phbnf phbnf self-requested a review June 16, 2025 17:21
@phbnf phbnf self-assigned this Jun 16, 2025
@phbnf
Copy link
Copy Markdown
Contributor

phbnf commented Jun 16, 2025

/gcbrun

Scheme: r.URL.Scheme,
User: r.URL.User,
Host: r.URL.Host,
Path: li.instanceOpts.Validated.Config.Prefix,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that this won't work with override_handler_prefix.

if u.Scheme == "" {
u.Scheme = "https"
}
if u.Host == "" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I spoke witch a bunch of folks about it, tried to predict how this would land on various deployments. I worry that this logic makes it hard to predict what this will output when the CTFE runs behind various proxies. I don't know how I would easily test that in a production environment, nor how I would make sure that it does not change over time. Plus, this would not return a single consistent host if the log happens to be served on multiple hosts. As much as I dislike this, I see no option but to add a "host" field to the config. I would even go as far as not serving this endpoint if the "host" field does not exist in that config.

@phbnf
Copy link
Copy Markdown
Contributor

phbnf commented Jun 19, 2025

Thanks for the PR - noted that it works on Sectigo's logs, and that this PR is also the result of conversations on Slack (apologies for not engaging back then, I was OOO). I worry that it might not work with all deployments though, so I'm thinking that we should aim for a more predictable behaviour?

@phbnf
Copy link
Copy Markdown
Contributor

phbnf commented Jun 20, 2025

/gcbrun

1 similar comment
@phbnf
Copy link
Copy Markdown
Contributor

phbnf commented Jun 20, 2025

/gcbrun

@phbnf
Copy link
Copy Markdown
Contributor

phbnf commented Jun 20, 2025

/gcbrun

@phbnf phbnf merged commit 7ccfa21 into google:master Jun 20, 2025
7 checks passed
@robstradling robstradling deleted the get_info_json branch June 20, 2025 17:38
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.

4 participants