Securing services within Docker container Using Identity Providers hosted within a container
I have the below setup
HOST |_Identity_Provider /.well-known/openid-configuration |_API |_Web_Application (REACT/REDUX) |_nginx DNS -Local/dev --www.example.local --api.example.local --identity.example.local -Production --www.example.com --api.example.com --identity.example.com
If I configure the API to use the internal hostname of the identity server “Identity_Provider” when the api queries the openId connect .well-known endpoint it uses http://Identity_Provider as the issuer but the React uses its “www.example.XXX” DNS name as the issuer.
Problem I am having is that when the api tries to authenticate the web application REST request it uses a different internal .well-known issuer name which is different in each environment. but because I do now know in advanced the internal IP address of the identity provider service I’m unable to configure the api to use the correct dns entry to retrieve openid connect authentication configuration.