OpenCTI-Platform / docker

OpenCTI Docker deployment helpers
156 stars 172 forks source link

client_secret missing for GoogleStrategy #12

Closed ideologysec closed 4 years ago

ideologysec commented 4 years ago
- PROVIDERS__GOOGLE__STRATEGY=GoogleStrategy
- PROVIDERS__GOOGLE__CONFIG__CLIENT__ID=${GOOGLE_CLIENT_ID}
- PROVIDERS__GOOGLE__CONFIG__CLIENT__SECRET=${GOOGLE_CLIENT_SECRET}
- PROVIDERS__GOOGLE__CONFIG__CALLBACK_URL=${GOOGLE_CALLBACK_URL}
- PROVIDERS__LOCAL__STRATEGY=LocalStrategy
SamuelHassine commented 4 years ago

Hello @ideologysec,

As mentioned in the documentation, levels of configuration are represented by double underscores (__). But the client_id, client_secretand callback_url. are just config keys with a single underscore.

In your case, the correct configuration is:

- PROVIDERS__GOOGLE__STRATEGY=GoogleStrategy
- PROVIDERS__GOOGLE__CONFIG__CLIENT_ID=${GOOGLE_CLIENT_ID}
- PROVIDERS__GOOGLE__CONFIG__CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- PROVIDERS__GOOGLE__CONFIG__CALLBACK_URL=${GOOGLE_CALLBACK_URL}
- PROVIDERS__LOCAL__STRATEGY=LocalStrategy

corresponding to:

"google": {
  "strategy": "GoogleStrategy",
  "config": {
    "client_id": "XXXXXXXXXXXXXXXXXX",
    "client_secret": "XXXXXXXXXXXXXXXXXX",
    "callback_url": "https://demo.opencti.io/auth/google/callback"
  }
}
ideologysec commented 4 years ago

I apologize, I had a comment typed up indicating I had figured this out, and was ready to hit close and comment... and it apparently never went through. Thanks for the doc link. I'm sorted out!