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

check the authorization status of implementors of an interface #3588

Merged
merged 16 commits into from
Aug 22, 2023
317 changes: 306 additions & 11 deletions apollo-router/src/plugins/authorization/authenticated.rs

Large diffs are not rendered by default.

373 changes: 358 additions & 15 deletions apollo-router/src/plugins/authorization/policy.rs

Large diffs are not rendered by default.

394 changes: 377 additions & 17 deletions apollo-router/src/plugins/authorization/scopes.rs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
Key(
"id",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: doc
---
query {
test
itf {
... on A {
id
other
}
... on B {
other
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
Fragment(
"B",
),
Key(
"id",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: doc
---
query {
test
itf {
other
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: doc
---
query {
test
itf {
... on A {
id
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
Fragment(
"B",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: doc
---
query {
test
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: paths
---
[
Path(
[
Key(
"me",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: doc
---
query {
topProducts {
type
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: paths
---
[
Path(
[
Key(
"uni",
),
Fragment(
"B",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
source: apollo-router/src/plugins/authorization/authenticated.rs
expression: doc
---
query {
test
uni {
... on A {
id
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
Key(
"id",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: doc
---
query {
test
itf {
... on A {
other
}
... on B {
other
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
Fragment(
"A",
),
Key(
"id",
),
],
),
Path(
[
Key(
"itf",
),
Fragment(
"B",
),
Key(
"id",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: doc
---
query {
test
itf {
other
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
Fragment(
"B",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: doc
---
query {
test
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: doc
---
query {
test
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: doc
---
query {
test
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: paths
---
[
Path(
[
Key(
"itf",
),
Fragment(
"A",
),
],
),
Path(
[
Key(
"itf",
),
Fragment(
"B",
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: doc
---
query {
test
itf {
... on A {
id
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
source: apollo-router/src/plugins/authorization/policy.rs
expression: doc
---
query {
test
}

Loading