Commit graph

240 commits

Author SHA1 Message Date
Tejasvi Nareddy
9992eebcac proxy: fix bug with incorrect addressing causing invalid route configs 2019-05-21 17:08:03 -04:00
Bobby DeSimone
3eff6cce13
internal/sessions: make user state domain scoped
internal/sessions: session state is domain scoped
internal/sessions: infer csrf cookie, route scoped
proxy & authenticate: use shared cookie name
proxy & authenticate: prevent resaving unchanged session
proxy & authenticate: redirect instead of error for no session on login
internal/config: merge cookies
proxy: remove favicon specific route
proxy: use mock server for tests
proxy: add tests for failures
2019-05-20 20:44:05 -07:00
Travis Groth
ebb6df6c3f Refactor to central options struct and parsing 2019-05-18 08:17:36 -04:00
Bobby DeSimone
cfac5f10ff
cmd/pomerium: move middleware for all http handlers to global context (#117) 2019-05-14 13:23:25 -07:00
Bobby DeSimone
5448e3599a
cmd/pomerium : refactor main to more testable (#112)
- cmd/pomerium: refactor global timeouts to be configurable
- cmd/pomerium: add tests
- cmd/pomerium: remove debug flag, set with env vars only
- cmd/pomerium: global ping now returns version not OK
- proxy: validate shared secret encoding and length
- docs: add timeout to example policy
- docs: document timeouts and cors
- docs: update pomerium logo
- docs: add policy authorization docs
2019-05-09 23:10:19 -07:00
Bobby DeSimone
5e37c29dfe
proxy: make http headers configurable (#108)
- http headers can be disabled via an env config
- http headers can be configured by k/v map env config
- pomerium/envconfig updated to use original syntax v1.5.0
- go.mod / go.sum patches updated
2019-05-07 12:05:25 -07:00
nitper
45bb2e0a4d
add cors_allow_preflight option to route policy 2019-05-03 15:16:46 -04:00
Bobby DeSimone
857b9e5773
cmd/pomerium: redirect http and add hsts headers (#92) 2019-04-24 13:29:11 -07:00
Bobby DeSimone
fbe1cae482
proxy: remove unused setting AuthorizeInternalAddr (#93)
- Added unit tests for policy validation.
- Removed extraneous policy validation for URLs.
- Add dependency caching to dockerfile.
2019-04-24 13:28:29 -07:00
Bobby DeSimone
b93a8aa79c
proxy: add debug message for cert pool 2019-03-24 17:12:37 -07:00
Bobby DeSimone
45e6a8dc57
docs: update changelog, documentaiton, and helm configurations. (#63)
- Update changelog.
- Update docs to cover authorization support.
- Updates helm to support authorization, and policy file.
2019-03-19 10:55:41 -07:00
Bobby DeSimone
0a501b61ed
authenticate: support kubernetes (#62)
- cmd/pomerium: made ping a toplevel route for all services.
- docs: updated kubernetes script and corresponding configuration yaml's
2019-03-12 15:31:17 -07:00
Bobby DeSimone
c13459bb88
authorize: add authorization (#59)
* authorize: authorization module adds support for per-route access policy. In this release we support the most common forms of identity based access policy: `allowed_users`, `allowed_groups`, and `allowed_domains`. In future versions, the authorization module will also support context and device based authorization policy and decisions. See website documentation for more details.
 * docs: updated `env.example` to include a `POLICY` setting example.
 * docs:  added `IDP_SERVICE_ACCOUNT` to  `env.example` .
 * docs: removed `PROXY_ROOT_DOMAIN` settings which has been replaced by `POLICY`.
 * all: removed `ALLOWED_DOMAINS` settings which has been replaced by `POLICY`. Authorization is now handled by the authorization service and is defined in the policy configuration files.
 * proxy: `ROUTES` settings which has been replaced by `POLICY`.
* internal/log: `http.Server` and `httputil.NewSingleHostReverseProxy` now uses pomerium's logging package instead of the standard library's built in one.

Closes #54
Closes #41
Closes #61
Closes #58
2019-03-07 12:47:07 -08:00
Bobby DeSimone
1187be2bf3
authenticator: support groups (#57)
- authenticate/providers: add group support to azure
- authenticate/providers: add group support to google
- authenticate/providers: add group support to okta
- authenticate/providers: add group support to onelogin
- {authenticate/proxy}: change default cookie lifetime timeout to 14 hours
- proxy: sign group membership
- proxy: add group header
- deployment: add CHANGELOG
- deployment: fix where make release wasn’t including version
2019-02-28 19:34:22 -08:00
Michael Barrientos
7b1e832b45 proxy: support certificate authority to verify server (#49) 2019-02-18 09:58:05 -08:00
Bobby DeSimone
88b7766c7d
proxy/authenticator: fix check to ensure port assigned (#51) 2019-02-17 18:29:11 -08:00
Michael Barrientos
6f93909194 all: fix misspelling of override (#50) 2019-02-17 12:35:26 -08:00
Bobby DeSimone
dbafc691c3
all: general cleanup readying for tagged release (#48)
- docs: add code coverage to readme
- internal/sessions: refactor sessions to clarify lifetime
- authenticate: simplified signin flow
- deployment: update go mods
- internal/testutil: removed package
- internal/singleflight: removed package
2019-02-16 12:43:18 -08:00
Bobby DeSimone
805f0198d2
authenticate: add tests, fix signout (#45)
- authenticate: a bug where sign out failed to revoke the remote session
- docs: add code coverage to readme
- authenticate: Rename shorthand receiver variable name
- authenticate: consolidate sign in
2019-02-14 00:01:50 -08:00
Bobby DeSimone
35ee3247d7
proxy: fix missing port 2019-02-12 16:43:22 -08:00
Bobby DeSimone
09744f6adb
proxy: add tests (#44) 2019-02-12 16:38:17 -08:00
Bobby DeSimone
4f4f3965aa
proxy: add unit tests (#43) 2019-02-11 20:15:01 -08:00
Bobby DeSimone
cedf9922d3
proxy: add unit tests (#42)
- Fixed pomerium.io site description
- Updated kubernetes examples to use the latest docker images.
- Use cryputil hash function for proxy hmac.
- Add unit tests for proxy handlers.
2019-02-08 22:39:48 -08:00
Bobby DeSimone
c886b924e7
authenticate: use gRPC for service endpoints (#39)
* authenticate: set cookie secure as default.
* authenticate: remove single flight provider.
* authenticate/providers: Rename “ProviderData” to “IdentityProvider”
* authenticate/providers: Fixed an issue where scopes were not being overwritten
* proxy/authenticate : http client code removed.
* proxy: standardized session variable names between services.
* docs: change basic docker-config to be an “all-in-one” example with no nginx load.
* docs:  nginx balanced docker compose example with intra-ingress settings.
* license:  attribution for adaptation of goji’s middleware pattern.
2019-02-08 10:10:38 -08:00
Bobby DeSimone
ebc1453292
proxy: use internal/httputil for error handling (#36)
- General formatting and comment cleanup.
- Inject pomerium version at compiletime via template package.
2019-01-30 12:22:03 -08:00
Bobby DeSimone
236e5cd7de
authenticate: remove extra login page (#34)
- Fixed a bug where Lifetime TTL was set to a minute.
- Remove nested mux in authenticate handlers.
- Remove extra ping endpoint in authenticate and proxy.
- Simplified sign in flow with multi-catch case statement.
- Removed debugging logging.
- Broke out cmd/pomerium options into own file.
- Renamed msicreant cipher to just cipher.

Closes #23
2019-01-29 20:28:55 -08:00
Bobby DeSimone
bcecee5ee3
docs: add kubernetes (#33)
- Update PR template to use Go language conventions.
- Moved healthcheck middleware to hijack a request before logging.
- Rewrote the quickstart guides to follow a similar pattern.
- Added an overview blurb on pomerium and its goals.
- Add an "example config" section to docs.
2019-01-27 22:22:14 -08:00
Bobby DeSimone
b1912128f3
proxy: fixed bug where ping wouldn't fire 2019-01-26 22:12:15 -08:00
Bobby DeSimone
7e1d1a7896
authenticate: refactor middleware, logging, and tests (#30)
- Abstract remaining middleware from authenticate into internal.
- Use middleware chaining in authenticate.
- Standardize naming of Request and ResponseWriter to match std lib.
- Add healthcheck / ping as a middleware.
- Internalized wraped_writer package adapted from goji/middleware.
- Fixed indirection issue with reverse proxy map.
2019-01-25 20:58:50 -08:00
Bobby DeSimone
426e003b03
proxy: add JWT request signing support (#19)
- Refactored middleware and request hander logging.
- Request refactored to use context.Context.
- Add helper (based on Alice) to allow middleware chaining.
- Add helper scripts to generate elliptic curve self-signed certificate that can be used to sign JWT.
- Changed LetsEncrypt scripts to use acme instead of certbot.
- Add script to have LetsEncrypt sign an RSA based certificate.
- Add documentation to explain how to verify headers.
- Refactored internal/cryptutil signer's code to expect a valid EC priv key.
- Changed JWT expiries to use default leeway period.
- Update docs and add screenshots.
- Replaced logging handler logic to use context.Context.
- Removed specific XML error handling.
- Refactored handler function signatures to prefer standard go idioms.
2019-01-22 21:44:22 -08:00
Bobby DeSimone
44527662fd
Rename Authenticator to Authenticate.
Rename single-constructor packages NewProxy and NewAuthenticator to New
Removed unused upstreamTransport.
2019-01-20 12:15:29 -08:00
Bobby DeSimone
2c7a7f2e02
cmd/pomerium: add check for service validity
proxy: update key check error message to check 32 bytes
authenticate: update key check error message to check 32 bytes
docs: update readme for clarity
2019-01-19 11:32:36 -08:00
Bobby DeSimone
24b11b0428
internal/cryputil: combines aead and cryptutil packages.
- Refactored encrypt / decrypt methods to use aead's NonceSize() interface method.
- Add explicit GenerateKey function.
- Remove mutex on XChaCha20.
2019-01-18 11:55:04 -08:00
Bobby DeSimone
72922b8ee8
internal/aead : replace miscreant with xchacha20poly1305 2019-01-16 12:14:51 -08:00
Bobby DeSimone
f50ed074b1
Remove unused test files.
Fix build at golang tip.
2019-01-15 15:47:28 -08:00
Bobby
074bc0e63c
cmd/promerium : support TLS configuration from environmental variables (#12)
* Add ability to set TLS configuration from environmental variables.
* Add support for enabling debug mode from environmental variables.
2019-01-15 15:24:05 -08:00
bdd
56c89e8653
Improve test coverage. (#8)
* Improve test coverage.
* Remove unused http status code argument from SignInPageMethod.
* Removed log package in internal packages.
* Add test to check https scheme is used for authorization url.
* Add unit tests for global logging package.
2019-01-11 13:49:28 -10:00
bdd
5a75ace403
Fixes #2 : Adds Microsoft Azure Active Directory provider support (#5) 2019-01-05 01:28:13 -08:00
Bobby DeSimone
90ab756de1
Added gif to the readme.
Simplified, and de-duplicated many of the configuration settings.
Removed configuration settings that could be deduced from other settings.
Added some basic documentation.
Removed the (duplicate?) user email domain validation check in proxy.
Removed the ClientID middleware check.
Added a shared key option to be used as a PSK instead of using the IDPs ClientID and ClientSecret.
Removed the CookieSecure setting as we only support secure.
Added a letsencrypt script to generate a wildcard certificate.
Removed the argument in proxy's constructor that allowed arbitrary fucntions to be passed in as validators.
Updated proxy's authenticator client to match the server implementation of just using a PSK.
Moved debug-mode logging into the log package.
Removed unused approval prompt setting.
Fixed a bug where identity provider urls were hardcoded.
Removed a bunch of unit tests. There have been so many changes many of these tests don't make sense and will need to be re-thought.
2019-01-04 18:25:03 -08:00
Bobby DeSimone
d56c889224
initial release 2019-01-02 12:13:36 -08:00