Skip to content

Commit

Permalink
chore: apply prettier formatting (ory#972)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik authored Jun 3, 2022
1 parent a06464b commit 8908ddb
Show file tree
Hide file tree
Showing 58 changed files with 478 additions and 1,117 deletions.
2 changes: 1 addition & 1 deletion .docker_compose/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mutators:
enabled: true
config:
headers:
X-User: "{{ print .Subject }}"
X-User: '{{ print .Subject }}'
noop:
enabled: true
id_token:
Expand Down
166 changes: 80 additions & 86 deletions .docker_compose/rules.json
Original file line number Diff line number Diff line change
@@ -1,99 +1,93 @@
[
{
"id": "allow-anonymous-with-header-mutator",
"upstream": {
"url": "https://httpbin.org/anything/header"
},
"match": {
"url": "http://<127.0.0.1|localhost>:4455/anything/header",
"methods": [
"GET"
]
},
"authenticators": [
{
"handler": "anonymous"
}
],
"authorizer": {
"handler": "allow"
},
"mutators": [
{
"handler": "header",
"config": {
"headers": {
"X-User": "{{ print .Subject }}"
}
}
}
]
{
"id": "allow-anonymous-with-header-mutator",
"upstream": {
"url": "https://httpbin.org/anything/header"
},
{
"id": "deny-anonymous",
"upstream": {
"url": "https://httpbin.org/anything/deny"
},
"match": {
"url": "http://<127.0.0.1|localhost>:4455/anything/deny",
"methods": [
"GET"
]
},
"authenticators": [
{
"handler": "anonymous"
}
],
"authorizer": {
"handler": "deny"
},
"mutators": [
{
"handler": "noop"
}
],
"errors": [
"match": {
"url": "http://<127.0.0.1|localhost>:4455/anything/header",
"methods": ["GET"]
},
"authenticators": [
{
"handler": "anonymous"
}
],
"authorizer": {
"handler": "allow"
},
"mutators": [
{
"handler": "header",
"config": {
"headers": {
"X-User": "{{ print .Subject }}"
}
}
}
]
},
{
"id": "deny-anonymous",
"upstream": {
"url": "https://httpbin.org/anything/deny"
},
"match": {
"url": "http://<127.0.0.1|localhost>:4455/anything/deny",
"methods": ["GET"]
},
"authenticators": [
{
"handler": "anonymous"
}
],
"authorizer": {
"handler": "deny"
},
"mutators": [
{
"handler": "noop"
}
],
"errors": [
{
"handler": "json",
"config": {
"when": [
{
"handler": "json",
"config": {
"when": [
{
"request": {
"header": {
"accept": ["application/json"]
}
}
}
]
"request": {
"header": {
"accept": ["application/json"]
}
},
}
}
]
}
},
{
"handler": "redirect",
"config": {
"when": [
{
"handler": "redirect",
"config": {
"when": [
{
"request": {
"header": {
"accept": ["text/*"]
}
}
}
]
"request": {
"header": {
"accept": ["text/*"]
}
}
}
]
]
}
}
]
},
{
"id": "allow-anonymous-with-id-token-mutator",
"upstream": {
"url": "https://httpbin.org/anything/id_token"
},
{
"id": "allow-anonymous-with-id-token-mutator",
"upstream": {
"url": "https://httpbin.org/anything/id_token"
},
"match": {
"url": "http://<127.0.0.1|localhost>:4455/anything/id_token",
"methods": [
"GET"
]
"methods": ["GET"]
},
"authenticators": [
{
Expand Down
17 changes: 6 additions & 11 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,13 @@ If you're unsure about any of them, don't hesitate to ask. We're here to help!
-->

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

## Further Comments
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
runs-on: ubuntu-latest
name: Run tests
strategy:
matrix:
matrix:
name: ['reload', 'e2e', 'forwarded-header']
needs:
- sdk-generate
Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '26 0 * * 2'

Expand All @@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
language: ['go']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
8 changes: 4 additions & 4 deletions .github/workflows/cve-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
uses: aquasecurity/trivy-action@master
if: ${{ always() }}
with:
image-ref: oryd/oathkeeper:${{ steps.vars.outputs.sha_short }}
image-ref: oryd/oathkeeper:${{ steps.vars.outputs.sha_short }}
format: 'table'
exit-code: '42'
ignore-unfixed: true
Expand All @@ -72,7 +72,7 @@ jobs:
uses: aquasecurity/trivy-action@master
if: ${{ always() }}
with:
image-ref: oryd/oathkeeper:alpine-${{ steps.vars.outputs.sha_short }}
image-ref: oryd/oathkeeper:alpine-${{ steps.vars.outputs.sha_short }}
format: 'table'
exit-code: '42'
ignore-unfixed: true
Expand All @@ -82,13 +82,13 @@ jobs:
uses: erzz/[email protected]
if: ${{ always() }}
with:
image: oryd/oathkeeper:${{ steps.vars.outputs.sha_short }}
image: oryd/oathkeeper:${{ steps.vars.outputs.sha_short }}
exit-code: 42
failure-threshold: fatal
- name: Dockle Linter
uses: erzz/[email protected]
if: ${{ always() }}
with:
image: oryd/oathkeeper:alpine-${{ steps.vars.outputs.sha_short }}
image: oryd/oathkeeper:alpine-${{ steps.vars.outputs.sha_short }}
exit-code: 42
failure-threshold: fatal
16 changes: 9 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ before:
hooks:
- go mod download
- git checkout -- go.sum go.mod
- curl -Lo /tmp/cosign.key https://raw.githubusercontent.com/ory/xgoreleaser/master/cosign.key
- curl -Lo /tmp/cosign.pub https://raw.githubusercontent.com/ory/xgoreleaser/master/cosign.pub
- 'curl -Lo /tmp/cosign.key
https://raw.githubusercontent.com/ory/xgoreleaser/master/cosign.key'
- 'curl -Lo /tmp/cosign.pub
https://raw.githubusercontent.com/ory/xgoreleaser/master/cosign.pub'
- go install github.com/gobuffalo/packr/v2/packr2
- packr2

variables:
brew_name: oathkeeper
brew_description: "The Ory Identity and Access Proxy (Ory Oathkeeper)"
buildinfo_hash: "github.com/ory/oathkeeper/x.Commit"
buildinfo_tag: "github.com/ory/oathkeeper/x.Version"
buildinfo_date: "github.com/ory/oathkeeper/x.Date"
dockerfile: "./Dockerfile-alpine"
brew_description: 'The Ory Identity and Access Proxy (Ory Oathkeeper)'
buildinfo_hash: 'github.com/ory/oathkeeper/x.Commit'
buildinfo_tag: 'github.com/ory/oathkeeper/x.Version'
buildinfo_date: 'github.com/ory/oathkeeper/x.Date'
dockerfile: './Dockerfile-alpine'

project_name: oathkeeper
Empty file added .prettierignore
Empty file.
Loading

0 comments on commit 8908ddb

Please sign in to comment.