Commit graph

54 commits

Author SHA1 Message Date
Denis Mishin
9baaea5e85
do not require idp set in the bootstrap config, as it may be later configured via the databroker (#3386) 2022-05-31 11:42:19 -04:00
Caleb Doxsey
a65024f8fe
github: fix missing groups (#3171) 2022-03-22 12:07:42 -06:00
Caleb Doxsey
f894205d08
directory: support non-base64 encoded service accounts (#3150) 2022-03-14 14:38:41 -06:00
JBodkin-Amphora
8567b56b8d
Extract email for active directory users that don't have access to exchange (#3053) 2022-03-04 13:18:39 -05:00
Caleb Doxsey
d1c4c55fd9
auth0: support explicit domains in the service account (#2980)
* auth0: support explicit domains in the service account

* also handle FromOptions
2022-02-02 08:58:05 -07:00
Caleb Doxsey
ed6c3e5087
google: support groups for users outside of the organization (#2950)
* google: support groups for users outside of the organization

* wrap error
2022-01-21 09:36:32 -07:00
Denis Mishin
6b26f58e4f
return explicit error when directory sync is disabled (#2949) 2022-01-19 17:02:49 -05:00
dependabot[bot]
58ca681f40
chore(deps): bump github.com/go-chi/chi from 1.5.4 to 4.1.2+incompatible (#2910)
* chore(deps): bump github.com/go-chi/chi from 1.5.4 to 4.1.2+incompatible

Bumps [github.com/go-chi/chi](https://github.com/go-chi/chi) from 1.5.4 to 4.1.2+incompatible.
- [Release notes](https://github.com/go-chi/chi/releases)
- [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-chi/chi/compare/v1.5.4...v4.1.2)

---
updated-dependencies:
- dependency-name: github.com/go-chi/chi
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* upgrade chi

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Caleb Doxsey <cdoxsey@pomerium.com>
2022-01-10 10:50:11 -07:00
cfanbo
84dad4c612
remove deprecated ioutil usages (#2877)
* fix: Fixed return description error

* config/options: Adjust the position of TracingJaegerAgentEndpoint option

* DOCS: Remove duplicate configuration items

Remove duplicate configuration items of route

* remove deprecated ioutil usages
2021-12-30 10:02:12 -08:00
Travis Groth
e2e0646f70
Fix IdP client metrics (#2810) 2021-12-08 13:22:53 -05:00
Caleb Doxsey
99b905a336
github: use GraphQL API to reduce number of API calls for directory sync (#2715)
* github: use GraphQL API to reduce number of API calls for directory sync

* fix id encoding

* github: use slug instead of id, update upgrading.md

* Update docs/docs/upgrading.md

Co-authored-by: Alex Fornuto <afornuto@pomerium.com>

Co-authored-by: Alex Fornuto <afornuto@pomerium.com>
2021-10-27 11:50:48 -06:00
Caleb Doxsey
823b430d60
google: support provider URL (#2567)
* google: support provider URL

* change google default options
2021-09-07 08:14:52 -06:00
Caleb Doxsey
8f7357b333
google: remove WithHTTPClient (#2391) 2021-07-23 15:36:56 -06:00
Caleb Doxsey
ac8ae3ef5b
directory: add logging http client to help with debugging outbound http requests (#2385) 2021-07-22 11:58:52 -06:00
Caleb Doxsey
2a5dcc2848
ci: use revive instead of golint (#2370) 2021-07-16 10:26:47 -06:00
Caleb Doxsey
b1d7a126ab
directory/azure: add paging support to user group members call (#2311) 2021-06-24 08:52:41 -06:00
wasaga
e0c09a0998
log context (#2107) 2021-04-22 10:58:13 -04:00
Caleb Doxsey
aeb8aaf9cd
directory: remove provider from user id (#2068) 2021-04-07 15:06:08 -06:00
contrun
c96ff595e5
fix not obtaining correct gitlab url because of empty string (#2044) 2021-03-31 11:21:16 -06:00
Caleb Doxsey
fd97561ab1
ping: identity and directory providers (#1975)
* ping: add identity provider

* ping: implement directory provider

* ping, not onelogin

* ping, not onelogin

* escape path params
2021-03-10 16:25:49 -07:00
Caleb Doxsey
03d8ffaee2
google: fix default provider URL (#1928) 2021-02-22 11:21:16 -07:00
renovate[bot]
2dc0be2ec9
chore(deps): update module auth0 to v5 (#1868)
* chore(deps): update module auth0 to v5

* fix v4->v5

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Caleb Doxsey <cdoxsey@pomerium.com>
2021-02-08 08:50:15 -07:00
renovate[bot]
9cee50a12c
chore(deps): update module google.golang.org/api to v0.38.0 (#1656)
* chore(deps): update module google.golang.org/api to v0.38.0

* fix google api tests

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Caleb Doxsey <cdoxsey@pomerium.com>
2021-02-01 07:18:56 -07:00
Caleb Doxsey
38935271e7
google: fix nil name (#1771) 2021-01-12 12:47:48 -07:00
bobby
f837c92741
dev: update linter (#1728)
- gofumpt everything
- fix TLS MinVersion to be at least 1.2
- add octal syntax
- remove newlines
- fix potential decompression bomb in ecjson
- remove implicit memory aliasing in for loops.

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
2020-12-30 09:02:57 -08:00
Nguyen Hoang Nam
931c87d85c
internal/directory: use gitlab provider url option (#1689)
* internal/directory: use gitlab provider url option

* deps: go mod tidy
2020-12-15 09:23:16 -07:00
FUKAYA Toshikuni
cf0a93f429
github: fix retrieving team id with graphql API (#1554) (#1555)
Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
2020-10-29 20:18:30 -07:00
Caleb Doxsey
aa731ae068
directory: add explicit RefreshUser endpoint for faster sync (#1460)
* directory: add explicit RefreshUser endpoint for faster sync

* add test

* implement azure

* update api call

* add test for azure User

* implement github

* implement AccessToken, gitlab

* implement okta

* implement onelogin

* fix test

* fix inconsistent test

* implement auth0
2020-10-05 08:23:15 -06:00
Jon Carl
f1daf336f6
auth0: implement directory provider (#1479)
* add the auth0 directory provider

Signed-off-by: Jon Carl <jon.carl@auth0.com>

* fix code climate issue: context.Context should be funcs first param

Signed-off-by: Jon Carl <jon.carl@auth0.com>

* remove unused struct field

Signed-off-by: Jon Carl <jon.carl@auth0.com>

* remove vendoring

Signed-off-by: Jon Carl <jon.carl@auth0.com>

* fix auth0 imports and variable name

Signed-off-by: Jon Carl <jon.carl@auth0.com>
2020-10-02 08:56:05 -06:00
Caleb Doxsey
697be04c6f
azure: incremental sync (#1471)
* azure: incremental sync

* identity manager: fix directory sync timing

* on unauthorized, reset token

* support querying the user api

* update name

* pull out constants
2020-09-30 08:18:04 -06:00
Caleb Doxsey
3e86d2f9bf
directory: additional user info (#1467)
* directory: support additional user information

* implement github

* implement gitlab

* implement onelogin

* implement okta

* rename to display name

* implement google

* fill in properties

* fix azure email parsing

* fix tests, lint

* fix onelogin tests

* fix gitlab/github tests
2020-09-29 09:38:16 -06:00
Caleb Doxsey
0860ec3a5c
okta: handle deleted groups (#1418)
* okta: handle deleted groups

* limit api error body read
2020-09-18 08:10:32 -06:00
Caleb Doxsey
665f0f9a74
azure: add support for nested groups (#1408)
* azure: add support for nested groups

* fix test
2020-09-17 08:25:10 -06:00
Cuong Manh Le
08a094ae93
internal/directory/okta: remove rate limiter (#1370)
We did honor the rate limit header from okta, so don't bother to add our
rate limiter there.
2020-09-04 18:23:14 +07:00
Cuong Manh Le
b8584a3f46
internal/directory/okta: accept non-json service account (#1359)
Fixes #1354
2020-09-01 22:33:55 +07:00
Caleb Doxsey
c4c8ef8e53
azure: support deriving credentials from client id, client secret and provider url (#1300) 2020-08-18 10:17:28 -06:00
Caleb Doxsey
a1378c81f8
cache: support databroker option changes (#1294) 2020-08-18 07:27:20 -06:00
Cuong Manh Le
a4408ab6cf internal/directory/okta: fix wrong API query filter
Okta uses space " " instead of plus sign "+" in query filter.
See https://developer.okta.com/docs/reference/api-overview/#filtering
2020-08-18 20:24:15 +07:00
Cuong Manh Le
23eea09ed0 internal/directory/okta: use okta filter to get updated groups
Okta API supports filter to get updated groups only, we can adopt that
to reduce number of requests to okta API, hence reduce chance that we
reach the rate limit.

Updates #1256
2020-08-14 22:01:31 +07:00
Cuong Manh Le
d1c0ae730f internal/directory/okta: honor rate limit reset header
So we can wait until the rate limit release time to continue query okta
API.

Updates #1256
2020-08-14 22:01:31 +07:00
Cuong Manh Le
598102f587 internal/directory/okta: add limiter to query okta API
Okta only allows 100 requests per minute, so apply the default rate
limit 1 QPS for it.

Fixes #1256
2020-08-14 09:50:49 +07:00
Cuong Manh Le
82b1daae50
internal/directory/okta: increase default batch size to 200 (#1264)
See: https://developer.okta.com/docs/reference/api/groups/#list-groups-with-membership-updated-after-timestamp

Updates #1256
2020-08-13 02:27:01 +07:00
Caleb Doxsey
1ad243dfd1
directory.Group entry for groups (#1118)
* store directory groups separate from directory users

* fix group lookup, azure display name

* remove fields restriction

* fix test

* also support email

* use Email as name for google'

* remove changed file

* show groups on dashboard

* fix test

* re-add accidentally removed code
2020-07-22 11:28:53 -06:00
Cuong Manh Le
59c17fb497
internal/directory: improve google user groups list (#1092)
Skip group without members, so it saves us time to handle group members,
and reduce the size of groups.

While at it, also querying API with the fields we need.

Fixes #567
2020-07-17 16:51:26 +07:00
Cuong Manh Le
ee1f9093ee
internal/directory: use both id and name for group (#1086)
Fixes #1085
2020-07-17 00:15:11 +07:00
Travis Groth
58810cdb52
internal/directory/google: return both group e-mail and id (#1083)
* internal/directory/google: return both group e-mail and id
2020-07-16 07:19:30 -04:00
Caleb Doxsey
091b71f12e
grpc: rename internal/grpc to pkg/grpc (#1010)
* grpc: rename internal/grpc to pkg/grpc

* don't ignore pkg dir

* remove debug line
2020-06-26 09:17:02 -06:00
Cuong Manh Le
1e3c381e1e
internal/directory/okta: store directory information by user id (#991)
Same as #988
2020-06-24 21:56:51 +07:00
Cuong Manh Le
a042bb7b82
internal/directory/onelogin: store directory information by user id (#992)
Same as #988
2020-06-24 21:56:33 +07:00
Caleb Doxsey
2501463dc9
google: store directory information by user id (#988) 2020-06-23 14:41:16 -06:00