Request header fields

Hi all,

From what I understood reading the ACME protocol, it’s possible to add two additional fields (accept-language and user-agent) to the header of each request.
In order to do it I should modify the certbot code setting them explicitly. Is it correct or did I skip any step?

Thank you.

I’m rather puzzled why you would like to modify certbot to send those two fields… Especially, I’m curious what you think to accomplish. Does the ACME server answer differently with or without those fields? Does certbot behave differently?

2 Likes

This stuff is directly set in acme/acme/client.py and certbot/certbot/client.py; you can search for User-Agent and user_agent to see relevant code.

I agree with @Osiris that changing these values will currently not produce any observable difference in behavior or functionality and may slightly annoy the CA staff by making the statistics about client applications a little harder to generate. For example, I don’t believe that the CA error messages have been translated into any other languages.

1 Like

Hi @roberta_sgroi, :wave:

Can you clarify what requests you were thinking of? E.g. requests from the ACME client to the ACME server? Requests from the ACME server to remote servers for validation requests? It sounds like the former based on your desire to modify Certbot but I want to make sure.

Thanks for the answers.

I don’t want to change the certbot code, I’m analyzing the protocol for my master thesis and I noticed that those two fields were mentioned like they should always be present, while doing some tests I didn’t see them in the header of the requests.

So can I suppose that the CA use their default value if they are not present and try to use the custom settings in case they are present?

Let’s ask @jsha about this!

The Let’s Encrypt server software (Boulder) doesn’t have any logic to customize behavior based on either of these headers. The User-Agent header is mainly used for analytics, it allows us to determine prevalence of client software and to associate behavior we see at the server with the client software that it originates from. In theory Accept-Language can be used to alter the language used in error messages sent from the server but Boulder does not implement this functionality and only produces english error messages.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.