Skip to content

Commit 989f52b

Browse files
committed
Fix bearer proto security definitions
Add correct security definition for JWT Authorization token headers so that swagger file is generated correctly.
1 parent 4170087 commit 989f52b

File tree

16 files changed

+638
-47
lines changed

16 files changed

+638
-47
lines changed

apigrpc/apigrpc.pb.go

Lines changed: 13 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apigrpc/apigrpc.proto

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
5858
}
5959
}
6060
security: {
61-
// Made up security so we can apply "Bearer <JWT_TOKEN>"
62-
key: "BearerJwt";
61+
key: "BearerJwt"
6362
value: {
64-
type: TYPE_INVALID;
63+
type: TYPE_API_KEY
64+
in: IN_HEADER
65+
name: "Authorization"
6566
}
6667
}
6768
security: {

apigrpc/apigrpc.swagger.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5225,7 +5225,9 @@
52255225
"type": "basic"
52265226
},
52275227
"BearerJwt": {
5228-
"type": ""
5228+
"type": "apiKey",
5229+
"name": "Authorization",
5230+
"in": "header"
52295231
},
52305232
"HttpKeyAuth": {
52315233
"type": "apiKey",

console/console.pb.go

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/console.proto

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
5555
}
5656
}
5757
security: {
58-
// Made up security so we can apply "Bearer <JWT_TOKEN>"
59-
key: "BearerJwt";
60-
value: {};
58+
key: "BearerJwt"
59+
value: {
60+
type: TYPE_API_KEY
61+
in: IN_HEADER
62+
name: "Authorization"
63+
}
6164
}
6265
}
6366
// Default security definition.

console/console.swagger.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4063,7 +4063,9 @@
40634063
"type": "basic"
40644064
},
40654065
"BearerJwt": {
4066-
"type": ""
4066+
"type": "apiKey",
4067+
"name": "Authorization",
4068+
"in": "header"
40674069
}
40684070
},
40694071
"security": [

console/ui/dist/prod-nt/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
<link rel="stylesheet" href="static/styles.14b882f135e080634619.css"></head>
1111
<body class="h-100">
1212
<app-root></app-root>
13-
<script src="static/runtime.4ced225923cd14368d64.js" defer=""></script><script src="static/polyfills.cb4331e883de4daa4c94.js" defer=""></script><script src="static/main.8e218c242568953c057c.js" defer=""></script></body>
13+
<script src="static/runtime.4ced225923cd14368d64.js" defer=""></script><script src="static/polyfills.cb4331e883de4daa4c94.js" defer=""></script><script src="static/main.2a180007707cc9b3ebfc.js" defer=""></script></body>
1414
</html>

console/ui/dist/prod-nt/static/main.8e218c242568953c057c.js renamed to console/ui/dist/prod-nt/static/main.2a180007707cc9b3ebfc.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/ui/dist/prod/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
<link rel="stylesheet" href="static/styles.14b882f135e080634619.css"></head>
1111
<body class="h-100">
1212
<app-root></app-root>
13-
<script src="static/runtime.4ced225923cd14368d64.js" defer=""></script><script src="static/polyfills.cb4331e883de4daa4c94.js" defer=""></script><script src="static/main.fccf1eefb431fad17814.js" defer=""></script></body>
13+
<script src="static/runtime.4ced225923cd14368d64.js" defer=""></script><script src="static/polyfills.cb4331e883de4daa4c94.js" defer=""></script><script src="static/main.560bf34df228ded4297b.js" defer=""></script></body>
1414
</html>

console/ui/dist/prod/static/main.fccf1eefb431fad17814.js renamed to console/ui/dist/prod/static/main.560bf34df228ded4297b.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)