71 Commits

Author SHA1 Message Date
Nicky Semenza
dae41a447c move GODEBUG from code to readme 2021-10-13 15:37:09 -07:00
Nicky Semenza
dcb780a3a5 use go 1.16, GODEBUG=x509ignoreCN=0, upgrade some old deps, replace travis with actions 2021-10-13 11:19:36 -07:00
Andrew Buss
5b9a4b2fcb Initial decrypt-sign support 2018-03-12 12:39:32 -07:00
Daniel Dao
d77eb9a456 move server code to an importable package
Commit 6f8424ad38
added an public function so we can import redoctober's NewServer
function in external test packages to create an RO server without having
to actually install the binary in test environments.

This used to work until 0f06d0a051,
which makes it impossible to import main package in external packages.

This change moves `NewServer` and its related code to a non-main
package so other packages can still import it in tests or any other
places.

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2017-06-21 10:31:22 -07:00
Kyle Isom
b6ab57791e Enable sentry reporting. (#180)
This commit adds basic sentry reporting. If enabled by setting the
appropriate configuration value, it will report panics and errors.
Certain functions in the core package (Delegate, Encrypt, Decrypt,
Restore, and ResetPersisted) have additional Sentry reporting as
these are the most common errors.
2016-12-08 14:40:08 -08:00
Kyle Isom
9f39413adb Properly restore delegations.
This change addresses several points:

1. The integration tests didn't verify that delegations could be used
   for decryption following a restore. The integration tests now
   verify this.

2. There was no functionality for clearing persisted delegations if
   needed. The vault admin can now do this via the command line tool.

3. Restoring active delegations wasn't storing the key with the
   delegation. Keys are now serialised properly.

4. [Minor] The MSP package now reports the name of the offending user
   when it can't find a user name in the database.
2016-08-24 13:22:13 -07:00
Kyle Isom
4da501264a Add CLI support for restore endpoint.
+ Add the relevant parts to the command line tool and the client
  package.
+ Small improvements to cryptor's restore function:
  + Don't try to restore if the store is already active.
  + Flush the persistence key cache once the restoration occurs.
+ The redoctober program now explicitly mentions that a config file is
  invalid when that's the case.
2016-08-16 15:12:14 -07:00
Kyle Isom
5a8e70047a Add a restore endpoint to Red October core. (#167)
This takes the work done in 7c95007cda and
provides an interface via the server's API.
2016-08-12 09:09:56 -07:00
Kyle Isom
8735061583 Don't merge configurations.
In practice, this introduced more problems than it solved.
2016-07-15 15:38:42 -07:00
Kyle Isom
79eda1eea1 Switch to string fields for key and certificate paths. (#154)
This simplifies our deployment process, allowing us to use existing
configuration management tools designed for templating command-line
parameters to template the config files in a straightforward manner.
2016-07-14 09:42:32 -07:00
Kyle Isom
cb16b159f3 Add a status endpoint to the server.
This pull request adds a status endpoint to the Red October server; as
of this pull request, the status endpoint only returns the current
delegation persistence state. The HTTP UI has not been updated, as
this is scoped out for a future request; however, the CLI utility now
features a status command to fetch this information.
2016-07-13 10:20:06 -07:00
Kyle Isom
a082c88a3c Add support for config files. (#151) 2016-06-29 10:22:53 -07:00
Kyle Isom
a63eaba58f Re-add integration tests.
This uses the prometheus endpoint to determine whether the redoctober
server has started.
2016-06-06 13:22:53 -07:00
Kyle Isom
79269824ee Add initial prometheus support to redoctober.
This doesn't add any redoctober-specific metrics yet; it's primarily
intended to be a healthcheck at this point.
2016-05-27 14:01:41 -07:00
Kyle Isom
31fddde23b Remove LimitListener. 2016-05-06 14:59:35 -07:00
Kyle Isom
6a38dec38d redoctober: disable HTTP/2.
There is an issue connecting to the HTTPS UI with HTTP/2 support.
Debugging is ongoing, but the immediate fix is to disable HTTP/2.
2016-05-04 18:32:35 -07:00
Jessica Frazelle
4340039d5b use go generate so index.html contents are not in redoctober.go
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-03-09 18:58:05 -08:00
Jessica Frazelle
382a6afe07 move flag parsing into init
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-03-09 18:29:05 -08:00
ejcx
d4a814fcec Don't use this port. Tests depend on 8080 2016-02-18 13:06:41 -08:00
Nick Sullivan
18b5ac859f Merge pull request #122 from ejcx/nonReqHipchatName
Don't require a hipchat name
2016-02-01 19:31:25 -08:00
ejcx
7c95b54aa8 Don't require a hipchat name for create user 2016-02-01 18:41:49 -08:00
Nick Sullivan
8a2a0396f7 Merge pull request #120 from benburkert/simplify-newserver
redoctober: simplify the NewServer signature
2016-02-01 17:29:56 -08:00
Ben Burkert
6f8424ad38 redoctober: simplify the NewServer signature
Remove the unexported type used in the NewServer func so that it may be
used outside this package, which allows for integration style tests that
start an instance of a RO server.

The channel based request locking has been replaced with LimitListener,
which prevents simultaneous handling of TCP connections.
2016-01-30 00:24:34 +00:00
ejcx
6991a38586 Take a slice of users for orders
Don't assume that the creator of the order wants the delegations.
Instead it's much nicer with our current scheme to take in a big
slice of people who want delegations, so that each person who ne
eds a delegation doesn't need to make an order.
2016-01-29 15:51:38 -08:00
ejcx
9292e137d2 Take care of Nick's nitpicks. All good changes 2016-01-25 16:48:42 -08:00
ejcx
378ebddf90 Make red october have slices of labels, and a link generator 2016-01-21 12:31:24 -08:00
e
95940ed3fa Add hipchat and ordering support to redoctober. Also fix XSS in RO
Supports MSP and requires several arguments to add hipchat integration to
red october. RedOctober will then alert on creation of an order, any new
delegation, or several other states.
2016-01-12 11:21:47 -08:00
Joshua Kroll
d9e9f26d8d Modify the way we listen on TLS, to try to encourage it to always happen. 2015-12-02 20:02:30 -08:00
Brendan McMillion
2422b2920d Update owners API and README with predicates. 2015-11-11 15:23:14 -08:00
Brendan McMillion
68e5403a7b Add predicate section to UI. 2015-11-11 15:22:57 -08:00
Kyle Isom
c0932d9cb5 Merge pull request #102 from ejcx/multiDel
Multiple delegations to redoctober
2015-11-11 08:28:35 -08:00
ejcx
c9a381d5c2 Multiple delegations to redoctober
The idea is to create a new type (to avoid ugly string parsing) and
then, instead of iterating through delegations with the username, iterate
through the delegations and look for your username and matching slot. Also
in cases we don't have the slot (everything but delegation), find the slot
when we match a user.
2015-11-11 08:26:26 -08:00
Joshua Kroll
bdd83dee7c Add a NameToCertificate map.
This enables SNI. Also fix bad session tickets issue from before.
2015-11-02 16:14:05 -08:00
Joshua Kroll
90ff2ceae2 Improve RO TLS config. 2015-11-02 15:06:17 -08:00
Joshua Kroll
fe973169fa Wrap systemd-provided sockets in a TLS listener.
This fixes a bug introduced by the new socket activation/systemd-brokered listening whereby Red October speaks HTTP rather than HTTPS over that socket.
2015-11-02 13:20:53 -08:00
Joshua Kroll
96c07919bb Fix the usage string, example systemd files, and README for breaking flags change. 2015-10-15 12:41:10 -07:00
Joshua Kroll
883ec0d8fb Merge the functionality of multiple keys/certs and single keys/certs into single flags.
This makes configuration easier, as the same flag is used regardless of how many keys/certs are being provided.
2015-10-15 10:54:06 -07:00
Joshua Kroll
1c9bccbfcc Modify Red October to listen with multiple certificates.
This allows a single Red October instance to have multiple names,
which is useful for load-balancing across multiple instances (e.g.,
one can have a fleet of instances (ro1, ro2, ...) and also a logical
name (redoctober.example.com) and have working access via both names
thanks to the magic of SNI.
2015-10-13 21:44:30 -07:00
Nick Sullivan
309f6021e2 Merge pull request #88 from cloudflare/jkroll/listen-systemd
Add the ability to listen to systemd-provided sockets.
2015-10-10 15:35:47 -07:00
J Delaney
2cb02e33bc Update web interface to use dedicated user creation API 2015-10-09 13:00:33 -07:00
J Delaney
9443fdbf7a Add dedicated API for creating users 2015-10-09 13:00:08 -07:00
Joshua Kroll
638a25bbbc Add the ability to listen to systemd-provided sockets.
Add a new flag, -systemdfds, which causes Red October to expect to be
provisioned on launch with file descriptors for sockets opened by
systemd. This is useful for socket activation, but also allows systemd
to bind privileged ports for us. I've included example systemd
configuration files that successfully start Red October as a service
user without admin rights but bound to 443 in a Jessie VM for me. They
need to be installed where systemd expects them, which on Jessie is
/etc/systemd/system/redoctober.service and
/etc/systemd/system/sockets.target.wants/redoctober.socket.
2015-10-09 11:24:08 -07:00
Zi Lin
b1ac8b4cc0 Add new operation: re-encrypt
're-encrypt' allows us to re-encrypt an RO encryption to a different set
of owners and labels. Currently two delegations are sufficient to carry
out this operation.
2015-08-11 16:43:28 -07:00
Giulio Iotti
6e4957554c Implement purge action to remove all delegates, closes #48 2015-07-20 23:48:16 -07:00
Kyle Isom
e0e6b260a0 Note the component that a log entry originates from.
Instead of just 'init', use 'core.init' for core commands. Likewise,
in the HTTP server, note log entries originate from the server.
2015-07-20 09:54:51 -07:00
Kyle Isom
df0db2f926 Report the correct endpoint in http logging. 2015-07-10 15:03:31 -07:00
Kyle Isom
ead76f2c30 Add export endpoint, permitting backing up the vault. 2015-07-09 13:28:18 -07:00
Nick Sullivan
1a8138e3c2 Merge pull request #69 from cloudflare/kyle/summary-fix
User summary fix and IP logging.
2015-07-09 11:54:08 -07:00
Kyle Isom
f8fd086af1 User summary fix and IP logging. 2015-07-09 11:37:29 -07:00
Kyle Isom
d9ae317ff7 Various index page cleanups. 2015-07-09 09:46:56 -07:00