- 
                Notifications
    You must be signed in to change notification settings 
- Fork 76
Add docs for Perforce IP enforcement #691
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
Conversation
| The latest updates on your projects. Learn more about Vercel for Git ↗︎ 
 | 
| { | ||
| "authorization": { | ||
| "subRepoPermissions": true, | ||
| "ignoreRulesWithHost": true | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a little confused on exactly what ignoreRulesWithHost does that is different than just having enforceIPRestrictions. Does this rule mean we don't just treat it as a * but we ignore the whole rule?
What is the default behavior if you don't set ignoreRulesWithHost?
Should we call out that these settings are mutually exclusive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So here I describe the default behaviour: https://github.com/sourcegraph/docs/pull/691/files#diff-265332799615f15ca1718cf47161c2845000523dfdea9385bc4363dddc0dfc0cR163-R170
We can mention that they're mutually exclusive. The site admin config should complain about it as well since it's encoded as mutually exclusive in the schema
| } | ||
| ``` | ||
|  | ||
| When `enforceIPRestrictions` is set to `true`, Sourcegraph will use the user's IP address to apply Perforce permissions at the user level. It uses the final `X-Forwarded-For` header in the request to identify the user's IP. Note that this header can be easily spoofed, so ensure your load balancer or proxy handles `X-Forwarded-For` headers securely. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have this last part in a !!! alert box saying we require you ensure via your load balancer that the last ip in x-forwarded-for is validated
| Hey @pjlast is this scheduled to go live with Sourcegraph 5.9? | 
| @MaedahBatool we're not certain when exactly this is going live yet | 
| 
 Gotcha, I am then converting it to a draft PR till we get a decision to avoid it from getting merged with the main. I am already prepping docs for SG 5.9, so if a decision is made, please ping me. :) | 
| @MaedahBatool seems like we're going ahead with merging this feature for the 5.9 release! | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I do agree with @mmanela's point about the double exclam alert, if that's possible that would be a good addition.
| Cool, I changed it to a warning instead of a note | 
| @pjlast is the PR complete? Can I merge with the 5.9 release branch? | 
| @MaedahBatool yes I've hit merge 👍 | 
Pull Request approval
Although pull request approval is not enforced for this repository in order to reduce friction, merging without a review will generate a ticket for the docs team to review your changes. So if possible, have your pull request approved before merging.