Skip to content

feat!: Switch from Kong proxy to NGINIX proxy#345

Merged
bnevis-i merged 4 commits intoedgexfoundry:mainfrom
bnevis-i:vault-auth
Mar 7, 2023
Merged

feat!: Switch from Kong proxy to NGINIX proxy#345
bnevis-i merged 4 commits intoedgexfoundry:mainfrom
bnevis-i:vault-auth

Conversation

@bnevis-i
Copy link
Collaborator

@bnevis-i bnevis-i commented Feb 21, 2023

BREAKING CHANGE: EdgeX 3.0 replaces the Kong reverse proxy with a generic NGINX reverse proxy. While the usage model remains the same, there is a minor change to the method by which a JWT authentication token is obtained.

This commit removes Kong and Postgres and replaces with a much lighter weight NGINX and a new security-proxy-auth service.

PR Checklist

Please check if your PR fulfills the following requirements:

Testing Instructions

From edgex-compose, compose-builder directory:

$ make pull ds-virtual
$ make run ds-virtual
$ watch docker ps -a

Ensure that all the services are stable (stay up for 2+ minutes) then try edgex-ui:

$ make get-token

Then browse to http://localhost:4000, paste in the token, and go to Data Center and watch for events (this will ensure that API gateway authentication is working properly.)

@bnevis-i bnevis-i marked this pull request as ready for review March 6, 2023 15:27
@bnevis-i bnevis-i requested review from lenny-goodell and vli11 March 6, 2023 18:24
@bnevis-i bnevis-i added this to the Minnesota milestone Mar 6, 2023
- edgex-network
edgex-network:
aliases:
- edgex-kong # temp patch for edgex-ui-go

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- edgex-kong # temp patch for edgex-ui-go
- edgex-nginx # temp patch for edgex-ui-go

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rejected. This is a workaround for edgexfoundry/edgex-ui-go#592 not being merged yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a TODO comment added to fix this once the UI is fixed?

security_opt:
- no-new-privileges:true

authproxy:
Copy link

@chr1shung chr1shung Mar 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about proxyauth or proxy-auth which is align with the microservice(binary) name ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to proxy-auth.

bnevis-i added 2 commits March 7, 2023 10:26
BREAKING CHANGE: EdgeX 3.0 replaces the Kong reverse proxy
with a generic NGINX reverse proxy.  While the usage model
remains the same, there is a minor change to the method by
which a JWT authentication token is obtained.

This commit removes Kong and Postgres and replaces with a
much lighter weight NGINX and a new security-proxy-auth service.

Signed-off-by: Bryon Nevis <bryon.nevis@intel.com>
Signed-off-by: Bryon Nevis <bryon.nevis@intel.com>
@bnevis-i bnevis-i requested a review from chr1shung March 7, 2023 18:36
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is compose-builder/get-consul-acl-token.sh now empty?

- edgex-network
edgex-network:
aliases:
- edgex-kong # temp patch for edgex-ui-go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a TODO comment added to fix this once the UI is fixed?

@lenny-goodell
Copy link
Member

Also, I assume the ADD_PROXY_ROUTE setting in add-service-secure-template.yml is still valid place for this?

@bnevis-i
Copy link
Collaborator Author

bnevis-i commented Mar 7, 2023

Why is compose-builder/get-consul-acl-token.sh now empty?

It isn't. I just chmod'ed it to be executable.

@lenny-goodell
Copy link
Member

It isn't. I just chmod'ed it to be executable.

Ok. Strange way for the PR to show that...

Signed-off-by: Bryon Nevis <bryon.nevis@intel.com>
@bnevis-i
Copy link
Collaborator Author

bnevis-i commented Mar 7, 2023

Also, I assume the ADD_PROXY_ROUTE setting in add-service-secure-template.yml is still valid place for this?

Should continue to work, but haven't put a lot of effort into testing it. Consumed by same container and didn't change any of the related scripts.

@bnevis-i
Copy link
Collaborator Author

bnevis-i commented Mar 7, 2023

@lenny-intel Changes in e249f2e

@bnevis-i bnevis-i requested a review from lenny-goodell March 7, 2023 23:39
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor cleanup left

KUIPER_VERSION=1.7-alpine
MOSQUITTO_VERSION=2.0
NATS_VERSION=2.9-alpine
NGINX_VERSION=1.23-alpine-slim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove KONG_VERSION and POSTGRES_VERSION

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 252fc9b

Signed-off-by: Bryon Nevis <bryon.nevis@intel.com>
@bnevis-i bnevis-i requested a review from lenny-goodell March 7, 2023 23:43
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bnevis-i bnevis-i merged commit b724a3d into edgexfoundry:main Mar 7, 2023
@bnevis-i bnevis-i deleted the vault-auth branch March 7, 2023 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants