Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
331f03d4
Commit
331f03d4
authored
Jul 30, 2020
by
Manuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfixes, changed swagger path
parent
461a987e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
token_service.py
...tage-discovery-microservice/app/services/token_service.py
+2
-3
__init__.py
src/modules/security/__init__.py
+0
-0
swagger.yml
src/rest-gateway/app/configs/swagger.yml
+1
-1
token_service.py
src/rest-gateway/app/services/token_service.py
+0
-1
deployment.yml
src/rest-gateway/deployment/deployment.yml
+8
-0
No files found.
src/data-hub/role-stage-discovery-microservice/app/services/token_service.py
View file @
331f03d4
from
security
import
security_util
s
as
security
from
security
import
security_util
def
verifyTokenRegular
(
token
,
required_scopes
):
def
verifyTokenRegular
(
token
,
required_scopes
):
# TODO call restGateway to verify the token
return
decodeToken
(
token
)
return
{}
def
verifyTokenAdmin
(
token
,
required_scopes
):
def
verifyTokenAdmin
(
token
,
required_scopes
):
# TODO call restGateway to verify the token
# TODO call restGateway to verify the token
...
...
src/modules/security/__init__.py
0 → 100644
View file @
331f03d4
src/rest-gateway/app/configs/swagger.yml
View file @
331f03d4
...
@@ -6,7 +6,7 @@ info:
...
@@ -6,7 +6,7 @@ info:
# Import security definitions from seperate file
# Import security definitions from seperate file
securityDefinitions
:
securityDefinitions
:
$ref
:
'
../
../../modules/
security/security.yml#securityDefinitions'
$ref
:
'
../security/security.yml#securityDefinitions'
consumes
:
consumes
:
-
"
application/json"
-
"
application/json"
...
...
src/rest-gateway/app/services/token_service.py
View file @
331f03d4
...
@@ -9,7 +9,6 @@ from typing import Dict
...
@@ -9,7 +9,6 @@ from typing import Dict
SIGNING_KEY
=
"yteNrMy6142WKwp8fKfrHkS5nlFpxtHgOXJh1ZPsOrV_gTcsO9eMY7aB7HUzRbTRO9dmZhCl3FdPtuvMe3K8aBA_wc2MmHRo8IkUIGmvUJGsAxKFClN_6oNW5fEvoeVKiL1krA-qjWbR_em-WksePgPoTsySW7QbKdi4f7cwuyK2_JZ2fQj9hDKlfJ2GzMXkKiWcfyCTr30yC6BviAFeRDD_Bpvg6znsrXr53Tq66hnwDwQ6QU7aHVu-bERblKZTYuvkSxsov6yRMEVWQoiuBITsQtIOcgSWK4Dy3BjSbqoIcKw3WG-s3wx1lTen19QbEu8vJC64e0iGeGDWT6vbtg"
SIGNING_KEY
=
"yteNrMy6142WKwp8fKfrHkS5nlFpxtHgOXJh1ZPsOrV_gTcsO9eMY7aB7HUzRbTRO9dmZhCl3FdPtuvMe3K8aBA_wc2MmHRo8IkUIGmvUJGsAxKFClN_6oNW5fEvoeVKiL1krA-qjWbR_em-WksePgPoTsySW7QbKdi4f7cwuyK2_JZ2fQj9hDKlfJ2GzMXkKiWcfyCTr30yC6BviAFeRDD_Bpvg6znsrXr53Tq66hnwDwQ6QU7aHVu-bERblKZTYuvkSxsov6yRMEVWQoiuBITsQtIOcgSWK4Dy3BjSbqoIcKw3WG-s3wx1lTen19QbEu8vJC64e0iGeGDWT6vbtg"
TOKEN_VALIDITY_IN_DAYS
=
1
TOKEN_VALIDITY_IN_DAYS
=
1
def
verifyTokenRegular
(
token
,
required_scopes
)
->
Dict
:
def
verifyTokenRegular
(
token
,
required_scopes
)
->
Dict
:
try
:
try
:
user
=
TokenService
.
verify
(
token
)
user
=
TokenService
.
verify
(
token
)
...
...
src/rest-gateway/deployment/deployment.yml
View file @
331f03d4
...
@@ -12,6 +12,14 @@ spec:
...
@@ -12,6 +12,14 @@ spec:
targetPort
:
5000
targetPort
:
5000
nodePort
:
30401
nodePort
:
30401
protocol
:
TCP
protocol
:
TCP
volumeMounts
:
-
mountPath
:
/srv/articonf
name
:
articonf
volumes
:
-
name
:
articonf
hostPath
:
path
:
/srv/articonf
type
:
Directory
---
---
apiVersion
:
apps/v1
apiVersion
:
apps/v1
kind
:
Deployment
kind
:
Deployment
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment