eclipse-tractusx / sldt-semantic-hub

Apache License 2.0
7 stars 11 forks source link

Unable to authorize to explore APIs #295

Open FaridLU opened 1 month ago

FaridLU commented 1 month ago

I have deployed semantic-hub in my local machine using minikube. When I tried to explore APIs in the Swagger documentation, it showed "Unauthorized."

image

After that, I used the "Authorize" button to authorize myself, but it doesn't show any available options (as in the picture below):

image

Can someone please help me out with this? Thanks in advance.

tunacicek commented 1 week ago

Hi @FaridLU : That is an known issue with swagger UI. Could you use postman or insomnia to call the APIs?

FaridLU commented 1 week ago

Hi @FaridLU : That is an known issue with swagger UI. Could you use postman or insomnia to call the APIs?

Dear @tunacicek, thanks for your reply. I really appreciate that.

Yes, I've tried Postman as well. I used the Keycloak configuration in the source code, which gave me an unauthorized error.

After that, I created a replica of that realm and set up my own realm, client, roles, and users, making them similar to the provided realm settings. After making those changes in Keycloak, I was able to authorize.

However, I was then getting a 403 Permission denied error. I can share the newly configured realm configuration, the jwt token (which contains the permission of that token), and any other thing if you need.

N.B: As the Kubernetes solution didn't work for me, I made the necessary changes in the source code and made a solution using docker and docker-compose.