steam-openid-connect-provider/README.md

53 lines
2.4 KiB
Markdown
Raw Normal View History

2019-10-13 14:30:32 +00:00
# Steam OpenId Connect Provider
Steam OpenID 2.0 -> OpenID Connect Provider Proxy
2019-05-01 21:32:45 +00:00
## About
Steam still uses the old OpenID 2.0 authentication protocol. Since ImperialPlugins.com has migrated to KeyCloak we were unable to migrate our old Steam logins as KeyCloak does not support OpenID 2.0.
2019-05-01 21:35:51 +00:00
This server will act as an OpenID Connect provider which will provide Steam authentication for you. This way you can use Steam logins in KeyCloak or any other OpenID Connect based authentication client.
Note: only "openid" and "profile" scopes are supported due limitations by Valve/Steam.
2019-05-01 21:32:45 +00:00
## Setup
Add your Steam API Key as user-secrets like this:
`dotnet user-secrets set "Authentication:Steam:ApplicationKey" "MySteamApiKey"`
Alternatively you can set it up via environment variables:
`-e Authentication__Steam__ApplicationKey: 'Your Steam ApiKey`
(Keep in mind that this is easier but more insecure)
2019-05-01 21:32:45 +00:00
After that set up your redirect URI, ClientID and ClientSecret in the appsettings.json.
2020-07-12 11:51:30 +00:00
## OpenID Configuration
You can access Authorization and Token endpoint details in
2020-07-12 12:02:47 +00:00
`http://<Your Host>/.well-known/openid-configuration`
2020-07-12 11:51:30 +00:00
2020-07-12 12:00:24 +00:00
## HTTPS Support
2020-07-12 12:02:21 +00:00
This server does not support https connections. If you want to use https connections please use a reverse proxy like nginx.
2020-07-12 12:00:24 +00:00
## Running behind reverse proxies
2020-07-12 12:02:21 +00:00
Some reverse proxy setups might require additional configuration, like setting the path base or origin.
2020-07-12 12:00:24 +00:00
2020-07-12 12:02:21 +00:00
To set the origin, set `Hosting:PublicOrigin` in the appsettings.json or the `Hosting__PublicOrigin` environment variable to your desired origin. If not set, the origin name is inferred from the request.
2020-07-12 12:00:24 +00:00
2020-07-12 12:02:21 +00:00
Similary, you can use the `Hosting:PathBase` in the appsettings.json or the `Hosting__PathBase` environment variable to set the path base. If not set, it will default to "/".
2020-07-12 12:00:24 +00:00
2019-10-13 14:35:44 +00:00
## Health checks
This service contains a health check endpoint at `/health`. It checks if the Steam login server is up.
2019-05-01 22:27:56 +00:00
## Docker
2020-07-12 11:45:37 +00:00
[A docker image](https://hub.docker.com/r/imperialplugins/steam-openid-connect-provider) is also available.
2019-05-01 22:27:56 +00:00
```
docker run -it \
-e OpenID__RedirectUri=http://localhost:8080/auth/realms/master/broker/steam/endpoint \
-e OpenID__ClientID=steamidp \
2019-05-01 22:27:56 +00:00
-e OpenID__ClientSecret=mysecret \
-e Authentication__Steam__ApplicationKey=MySteamApiKey \
2019-05-01 22:27:56 +00:00
--restart unless-stopped \
--name steamidp \
imperialplugins/steam-openid-connect-provider
2019-05-01 22:27:56 +00:00
```
2019-05-01 21:32:45 +00:00
## License
[MIT](https://github.com/ImperialPlugins/steam-openid-connect-provider/blob/master/LICENSE)