Skip to content

Commit e5e4de4

Browse files
gen1us2kaeneasr
andauthored
feat: pass only essential and configured headers to authenticator (#952)
BREAKING CHANGE: From now on, the `bearer_token` and `cookie_session` handlers pass only the needed header (`Authorization`, `Cookie`) to the check URL. To pass additional headers, use the `forward_http_headers` configuration key. Closes #954 Closes ory/network#76 Co-authored-by: hackerman <[email protected]>
1 parent 58c7fdf commit e5e4de4

33 files changed

+2155
-1258
lines changed

.docker_compose/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ mutators:
2626
enabled: true
2727
config:
2828
headers:
29-
X-User: '{{ print .Subject }}'
29+
X-User: "{{ print .Subject }}"
3030
noop:
3131
enabled: true
3232
id_token:

.github/ISSUE_TEMPLATE/BUG-REPORT.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
description: 'Create a bug report'
1+
description: "Create a bug report"
22
labels:
33
- bug
4-
name: 'Bug Report'
4+
name: "Bug Report"
55
body:
66
- attributes:
77
value: "Thank you for taking the time to fill out this bug report!\n"
88
type: markdown
99
- attributes:
10-
label: 'Preflight checklist'
10+
label: "Preflight checklist"
1111
options:
1212
- label:
13-
'I could not find a solution in the existing issues, docs, nor
14-
discussions.'
13+
"I could not find a solution in the existing issues, docs, nor
14+
discussions."
1515
required: true
1616
- label:
1717
"I agree to follow this project's [Code of
@@ -22,18 +22,18 @@ body:
2222
Guidelines](https://github.com/ory/oathkeeper/blob/master/CONTRIBUTING.md)."
2323
required: true
2424
- label:
25-
'This issue affects my [Ory Cloud](https://www.ory.sh/) project.'
25+
"This issue affects my [Ory Cloud](https://www.ory.sh/) project."
2626
- label:
27-
'I have joined the [Ory Community Slack](https://slack.ory.sh).'
27+
"I have joined the [Ory Community Slack](https://slack.ory.sh)."
2828
- label:
29-
'I am signed up to the [Ory Security Patch
30-
Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53).'
29+
"I am signed up to the [Ory Security Patch
30+
Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53)."
3131
id: checklist
3232
type: checkboxes
3333
- attributes:
34-
description: 'A clear and concise description of what the bug is.'
35-
label: 'Describe the bug'
36-
placeholder: 'Tell us what you see!'
34+
description: "A clear and concise description of what the bug is."
35+
label: "Describe the bug"
36+
placeholder: "Tell us what you see!"
3737
id: describe-bug
3838
type: textarea
3939
validations:
@@ -47,28 +47,28 @@ body:
4747
1. Run `docker run ....`
4848
2. Make API Request to with `curl ...`
4949
3. Request fails with response: `{"some": "error"}`
50-
label: 'Reproducing the bug'
50+
label: "Reproducing the bug"
5151
id: reproduce-bug
5252
type: textarea
5353
validations:
5454
required: true
5555
- attributes:
5656
description:
57-
'Please copy and paste any relevant log output. This will be
57+
"Please copy and paste any relevant log output. This will be
5858
automatically formatted into code, so no need for backticks. Please
59-
redact any sensitive information'
60-
label: 'Relevant log output'
59+
redact any sensitive information"
60+
label: "Relevant log output"
6161
render: shell
6262
placeholder: |
6363
log=error ....
6464
id: logs
6565
type: textarea
6666
- attributes:
6767
description:
68-
'Please copy and paste any relevant configuration. This will be
68+
"Please copy and paste any relevant configuration. This will be
6969
automatically formatted into code, so no need for backticks. Please
70-
redact any sensitive information!'
71-
label: 'Relevant configuration'
70+
redact any sensitive information!"
71+
label: "Relevant configuration"
7272
render: yml
7373
placeholder: |
7474
server:
@@ -77,14 +77,14 @@ body:
7777
id: config
7878
type: textarea
7979
- attributes:
80-
description: 'What version of our software are you running?'
80+
description: "What version of our software are you running?"
8181
label: Version
8282
id: version
8383
type: input
8484
validations:
8585
required: true
8686
- attributes:
87-
label: 'On which operating system are you observing this issue?'
87+
label: "On which operating system are you observing this issue?"
8888
options:
8989
- Ory Cloud
9090
- macOS
@@ -95,19 +95,19 @@ body:
9595
id: operating-system
9696
type: dropdown
9797
- attributes:
98-
label: 'In which environment are you deploying?'
98+
label: "In which environment are you deploying?"
9999
options:
100100
- Ory Cloud
101101
- Docker
102-
- 'Docker Compose'
103-
- 'Kubernetes with Helm'
102+
- "Docker Compose"
103+
- "Kubernetes with Helm"
104104
- Kubernetes
105105
- Binary
106106
- Other
107107
id: deployment
108108
type: dropdown
109109
- attributes:
110-
description: 'Add any other context about the problem here.'
110+
description: "Add any other context about the problem here."
111111
label: Additional Context
112112
id: additional
113113
type: textarea

.github/ISSUE_TEMPLATE/DESIGN-DOC.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
description:
2-
'A design document is needed for non-trivial changes to the code base.'
2+
"A design document is needed for non-trivial changes to the code base."
33
labels:
44
- rfc
5-
name: 'Design Document'
5+
name: "Design Document"
66
body:
77
- attributes:
88
value: |
@@ -18,11 +18,11 @@ body:
1818
after code reviews, and your pull requests will be merged faster.
1919
type: markdown
2020
- attributes:
21-
label: 'Preflight checklist'
21+
label: "Preflight checklist"
2222
options:
2323
- label:
24-
'I could not find a solution in the existing issues, docs, nor
25-
discussions.'
24+
"I could not find a solution in the existing issues, docs, nor
25+
discussions."
2626
required: true
2727
- label:
2828
"I agree to follow this project's [Code of
@@ -33,18 +33,18 @@ body:
3333
Guidelines](https://github.com/ory/oathkeeper/blob/master/CONTRIBUTING.md)."
3434
required: true
3535
- label:
36-
'This issue affects my [Ory Cloud](https://www.ory.sh/) project.'
36+
"This issue affects my [Ory Cloud](https://www.ory.sh/) project."
3737
- label:
38-
'I have joined the [Ory Community Slack](https://slack.ory.sh).'
38+
"I have joined the [Ory Community Slack](https://slack.ory.sh)."
3939
- label:
40-
'I am signed up to the [Ory Security Patch
41-
Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53).'
40+
"I am signed up to the [Ory Security Patch
41+
Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53)."
4242
id: checklist
4343
type: checkboxes
4444
- attributes:
4545
description: |
4646
This section gives the reader a very rough overview of the landscape in which the new system is being built and what is actually being built. This isn’t a requirements doc. Keep it succinct! The goal is that readers are brought up to speed but some previous knowledge can be assumed and detailed info can be linked to. This section should be entirely focused on objective background facts.
47-
label: 'Context and scope'
47+
label: "Context and scope"
4848
id: scope
4949
type: textarea
5050
validations:
@@ -53,7 +53,7 @@ body:
5353
- attributes:
5454
description: |
5555
A short list of bullet points of what the goals of the system are, and, sometimes more importantly, what non-goals are. Note, that non-goals aren’t negated goals like “The system shouldn’t crash”, but rather things that could reasonably be goals, but are explicitly chosen not to be goals. A good example would be “ACID compliance”; when designing a database, you’d certainly want to know whether that is a goal or non-goal. And if it is a non-goal you might still select a solution that provides it, if it doesn’t introduce trade-offs that prevent achieving the goals.
56-
label: 'Goals and non-goals'
56+
label: "Goals and non-goals"
5757
id: goals
5858
type: textarea
5959
validations:
@@ -65,7 +65,7 @@ body:
6565
The design doc is the place to write down the trade-offs you made in designing your software. Focus on those trade-offs to produce a useful document with long-term value. That is, given the context (facts), goals and non-goals (requirements), the design doc is the place to suggest solutions and show why a particular solution best satisfies those goals.
6666
6767
The point of writing a document over a more formal medium is to provide the flexibility to express the problem set at hand in an appropriate manner. Because of this, there is no explicit guidance for how to actually describe the design.
68-
label: 'The design'
68+
label: "The design"
6969
id: design
7070
type: textarea
7171
validations:
@@ -74,21 +74,21 @@ body:
7474
- attributes:
7575
description: |
7676
If the system under design exposes an API, then sketching out that API is usually a good idea. In most cases, however, one should withstand the temptation to copy-paste formal interface or data definitions into the doc as these are often verbose, contain unnecessary detail and quickly get out of date. Instead focus on the parts that are relevant to the design and its trade-offs.
77-
label: 'APIs'
77+
label: "APIs"
7878
id: apis
7979
type: textarea
8080

8181
- attributes:
8282
description: |
8383
Systems that store data should likely discuss how and in what rough form this happens. Similar to the advice on APIs, and for the same reasons, copy-pasting complete schema definitions should be avoided. Instead focus on the parts that are relevant to the design and its trade-offs.
84-
label: 'Data storage'
84+
label: "Data storage"
8585
id: persistence
8686
type: textarea
8787

8888
- attributes:
8989
description: |
9090
Design docs should rarely contain code, or pseudo-code except in situations where novel algorithms are described. As appropriate, link to prototypes that show the implementability of the design.
91-
label: 'Code and pseudo-code'
91+
label: "Code and pseudo-code"
9292
id: pseudocode
9393
type: textarea
9494

@@ -101,7 +101,7 @@ body:
101101
On the other end are systems where the possible solutions are very well defined, but it isn’t at all obvious how they could even be combined to achieve the goals. This may be a legacy system that is difficult to change and wasn’t designed to do what you want it to do or a library design that needs to operate within the constraints of the host programming language.
102102
103103
In this situation you may be able to enumerate all the things you can do relatively easily, but you need to creatively put those things together to achieve the goals. There may be multiple solutions, and none of them are really great, and hence such a document should focus on selecting the best way given all identified trade-offs.
104-
label: 'Degree of constraint'
104+
label: "Degree of constraint"
105105
id: constrait
106106
type: textarea
107107

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
description:
2-
'Suggest an idea for this project without a plan for implementation'
2+
"Suggest an idea for this project without a plan for implementation"
33
labels:
44
- feat
5-
name: 'Feature Request'
5+
name: "Feature Request"
66
body:
77
- attributes:
88
value: |
@@ -11,11 +11,11 @@ body:
1111
If you already have a plan to implement a feature or a change, please create a [design document](https://github.com/aeneasr/gh-template-test/issues/new?assignees=&labels=rfc&template=DESIGN-DOC.yml) instead if the change is non-trivial!
1212
type: markdown
1313
- attributes:
14-
label: 'Preflight checklist'
14+
label: "Preflight checklist"
1515
options:
1616
- label:
17-
'I could not find a solution in the existing issues, docs, nor
18-
discussions.'
17+
"I could not find a solution in the existing issues, docs, nor
18+
discussions."
1919
required: true
2020
- label:
2121
"I agree to follow this project's [Code of
@@ -26,18 +26,18 @@ body:
2626
Guidelines](https://github.com/ory/oathkeeper/blob/master/CONTRIBUTING.md)."
2727
required: true
2828
- label:
29-
'This issue affects my [Ory Cloud](https://www.ory.sh/) project.'
29+
"This issue affects my [Ory Cloud](https://www.ory.sh/) project."
3030
- label:
31-
'I have joined the [Ory Community Slack](https://slack.ory.sh).'
31+
"I have joined the [Ory Community Slack](https://slack.ory.sh)."
3232
- label:
33-
'I am signed up to the [Ory Security Patch
34-
Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53).'
33+
"I am signed up to the [Ory Security Patch
34+
Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53)."
3535
id: checklist
3636
type: checkboxes
3737
- attributes:
3838
description:
39-
'Is your feature request related to a problem? Please describe.'
40-
label: 'Describe your problem'
39+
"Is your feature request related to a problem? Please describe."
40+
label: "Describe your problem"
4141
placeholder:
4242
"A clear and concise description of what the problem is. Ex. I'm always
4343
frustrated when [...]"
@@ -50,28 +50,28 @@ body:
5050
Describe the solution you'd like
5151
placeholder: |
5252
A clear and concise description of what you want to happen.
53-
label: 'Describe your ideal solution'
53+
label: "Describe your ideal solution"
5454
id: solution
5555
type: textarea
5656
validations:
5757
required: true
5858
- attributes:
5959
description: "Describe alternatives you've considered"
60-
label: 'Workarounds or alternatives'
60+
label: "Workarounds or alternatives"
6161
id: alternatives
6262
type: textarea
6363
validations:
6464
required: true
6565
- attributes:
66-
description: 'What version of our software are you running?'
66+
description: "What version of our software are you running?"
6767
label: Version
6868
id: version
6969
type: input
7070
validations:
7171
required: true
7272
- attributes:
7373
description:
74-
'Add any other context or screenshots about the feature request here.'
74+
"Add any other context or screenshots about the feature request here."
7575
label: Additional Context
7676
id: additional
7777
type: textarea

.github/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
todo:
2-
keyword: '@todo'
2+
keyword: "@todo"
33
label: todo

.github/pull_request_template.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,18 @@ If you're unsure about any of them, don't hesitate to ask. We're here to help!
3838
-->
3939

4040
- [ ] I have read the [contributing guidelines](../blob/master/CONTRIBUTING.md).
41-
- [ ] I have referenced an issue containing the design document if my change introduces a new feature.
42-
- [ ] I am following the [contributing code guidelines](../blob/master/CONTRIBUTING.md#contributing-code).
41+
- [ ] I have referenced an issue containing the design document if my change
42+
introduces a new feature.
43+
- [ ] I am following the
44+
[contributing code guidelines](../blob/master/CONTRIBUTING.md#contributing-code).
4345
- [ ] I have read the [security policy](../security/policy).
44-
- [ ] I confirm that this pull request does not address a security vulnerability. If this pull request addresses a security.
45-
vulnerability, I confirm that I got green light (please contact [[email protected]](mailto:[email protected])) from the
46-
maintainers to push the changes.
47-
- [ ] I have added tests that prove my fix is effective or that my feature works.
46+
- [ ] I confirm that this pull request does not address a security
47+
vulnerability. If this pull request addresses a security. vulnerability, I
48+
confirm that I got green light (please contact
49+
[[email protected]](mailto:[email protected])) from the maintainers to push
50+
the changes.
51+
- [ ] I have added tests that prove my fix is effective or that my feature
52+
works.
4853
- [ ] I have added or changed [the documentation](https://github.com/ory/docs).
4954

5055
## Further Comments

0 commit comments

Comments
 (0)