Replies: 5 comments 2 replies
-
@pachori91 , you can't submit two issues in one question, and you need to provide more information about your issues. Jieke |
Beta Was this translation helpful? Give feedback.
-
Hi @jiekechoo Thanks for your reply. Lets discuss for first query only- After following Configure Add On Service documentation my custom application service is secured behind the NGNIX means-
But while i was testing microservice level security (New feature in EdgeX Minnesota release) for My Custom application Servcie it was failed as described in previous post where i tried with curl as below- SO my question is - Thanks |
Beta Was this translation helpful? Give feedback.
-
Yes, EDGEX_SECURITY_SECRET_STORE: "true" is provided into docker-compose.yml Let me explain what i have in docker-compose.yml The Service i have as below- Further as per Configure Add On Service document below environment variable added in respective services- Note:- "custom-app-service" is the service key of my custom application service. |
Beta Was this translation helpful? Give feedback.
-
yes it is present and same directory have file named as "secrets-token.json" content of secret-token.json is a below { |
Beta Was this translation helpful? Give feedback.
-
Here is some info to help you debug: In app-functions-sdk-go it starts the web server and registers the common endpoints: The version route is registered here: The pipeline authentication hook is instantiated here: The authentication handler is here: Optional disable for it is here: If the Auto function detects security is disabled, it just returns a Nil authentication handler here: Otherwise, you get a real handler and the actual check for token validity is here: If you are running without the EdgeX secret store, it returns the InsecureSecretsProvider, which returns true always If you are running with the EdgeX secret store, it returns a real secret provider, that checks the JWT with Vault: If you end up at line 245, your service actually isn't running in secure mode. If you end up at line 477, then it is. If you end up at line 477 and you always get true back no matter what is passed for the JWT, there are big problems. (For reference, I hit the /api/v3/version endpoint of app-http-export and it works as expected--HTTP 401) |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have implemented a Custom Application Service by using app function sdk. and that was working fine while runing with non-secured EdgeX Environment.
Now i am trying to run Edegx in secured mod for that i just followed Configure Add On Service Documnetation to configure my Custom Application service. As the result all EdgeX services and Custom Appliation Servcie are started properly and application service doing its job as expected.
But to check if service leve authentication applied to my Custom Applciation Service I JUST executed below curl command
curl "http://localhost:(csutom-application-service-prot)/api/v3/version". Here i was expecting Unauthorized(401) but it was 200.
So do i need to make any code change in my Custom Applicaiton service or something else i am missed while configuration.
Please suggest me step to apply service level authentication for Cutom Application service.
One more issue i am facing while trying to create device profile from the EdgeX UI. I am getting error as below while trying to submit add profile form.
Error - code: 400 , message: request failed, status code: 401, err: Unauthorized
Thanks
Beta Was this translation helpful? Give feedback.
All reactions