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

Add option for the logging middleware to log real IP #2002

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

leonweecs
Copy link
Contributor

@leonweecs leonweecs commented Sep 17, 2024

Implements #1995

Name of feature:

Pain or issue this feature alleviates:

Please refer to #1995.

Why is this important to the project (if not answered above):

N/A

Is there documentation on how to use this feature? If so, where?

N/A

In what environments or workflows is this feature supported?

When step-ca is sitting behind a reverse proxy, e.g. AWS ALB, Cloudflare and so on.

In what environments or workflows is this feature explicitly NOT supported (if any)?

N/A

It is worth noting that this feature is best not to be turned on when you can't trust the headers used, see here for more info,

Supporting links/other PRs/issues:

💔Thank you!

@github-actions github-actions bot added the needs triage Waiting for discussion / prioritization by team label Sep 17, 2024
@hslatman hslatman linked an issue Sep 17, 2024 that may be closed by this pull request
This commit adds the option (enabled via environment variable) to the
logging middleware to log real/originating IP address of a client based
on specific headers.

Three headers are supported: True-Client-IP, X-Real-IP, X-Forwarded-For.

This is particularly useful when there is proxy server(s) sitting
between step-ca and client.

Implements smallstep#1995
@azazeal azazeal merged commit 45f44e4 into smallstep:master Sep 24, 2024
12 of 13 checks passed
@hslatman hslatman added this to the v0.27.5 milestone Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logging middleware logs real/originating IP address
3 participants