Skip to content

Commit

Permalink
v3 to support new deck
Browse files Browse the repository at this point in the history
  • Loading branch information
ikethecoder committed Oct 4, 2023
1 parent f69b27a commit d29cc4b
Show file tree
Hide file tree
Showing 11 changed files with 852 additions and 3 deletions.
6 changes: 6 additions & 0 deletions microservices/gatewayApi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -

#COPY --from=build /deck/deck /usr/local/bin

# gwa api v1/v2
RUN curl -sL https://github.com/kong/deck/releases/download/v1.5.0/deck_1.5.0_linux_amd64.tar.gz -o deck.tar.gz && \
tar -xf deck.tar.gz -C /tmp && \
cp /tmp/deck /usr/local/bin/

# gwa api v3
RUN curl -sL https://github.com/Kong/deck/releases/download/v1.27.1/deck_1.27.1_linux_amd64.tar.gz -o deck.tar.gz && \
tar -xf deck.tar.gz -C /tmp && \
cp /tmp/deck /usr/local/bin/deck127

COPY requirements.txt requirements.txt

RUN pip install -r requirements.txt
Expand Down
2 changes: 2 additions & 0 deletions microservices/gatewayApi/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import v1.v1 as v1
import v2.v2 as v2
import v3.v3 as v3

def create_app(test_config=None):

Expand Down Expand Up @@ -43,6 +44,7 @@ def create_app(test_config=None):
##Routes##
v1.Register(app)
v2.Register(app)
v3.Register(app)
Compress(app)

@app.before_request
Expand Down
4 changes: 2 additions & 2 deletions microservices/gatewayApi/clients/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def record_gateway_event(event_id, action, result, namespace, message="", blob="
entity = 'gateway configuration'

actor = "Unknown Actor"
if "clientId" in g.principal:
if 'principal' in g and "clientId" in g.principal:
actor = g.principal["clientId"]
if "name" in g.principal:
if 'principal' in g and "name" in g.principal:
actor = g.principal["name"]

payload = {
Expand Down
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions microservices/gatewayApi/v3/auth/auth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from auth.auth import admin_jwt
from auth.authz import enforce_authorization, enforce_role_authorization, users_group_root, admins_group_root, ns_claim
from auth.uma import uma_enforce
Empty file.
Loading

0 comments on commit d29cc4b

Please sign in to comment.