Commit Graph
316 Commits
Author SHA1 Message Date
Mahrud SayrafiandKyle Isom 433afa9574 Replaced ssh subcommand with a working ssh-agent subcommand 2018-03-12 12:39:32 -07:00
Mahrud SayrafiandKyle Isom e6481c0513 Fixing rebase of andrewbuss/decrypt_sign
Also switched testdata/ssh_key with an ssh-ed25519 key
2018-03-12 12:39:32 -07:00
Andrew BussandKyle Isom 9a49b3a39e Rebasing fixups 2018-03-12 12:39:32 -07:00
Andrew BussandKyle Isom 370d8c6d3b Ran goimports on the whole project. No functional changes 2018-03-12 12:39:32 -07:00
Andrew BussandKyle Isom 7fb0228c2a Addressed comments
Addressed comments
2018-03-12 12:39:32 -07:00
Andrew BussandKyle Isom 186092a44e Renamed DecryptSign -> SSHSignWith, added tests for SSHSignWith and Usages 2018-03-12 12:39:32 -07:00
Andrew BussandKyle Isom 4571399c6f Include Usages field when computing HMAC 2018-03-12 12:39:32 -07:00
Andrew BussandKyle Isom 2e2ee53f30 Added Usages field to web interface 2018-03-12 12:39:32 -07:00
Andrew BussandKyle Isom bba026d535 Added SSH authentication example to README 2018-03-12 12:39:32 -07:00
Andrew BussandKyle Isom 9035eed8fd Add SSH wrapper to RO client
Add Usages field to EncryptedData to allow creation of a file which
can only be used to create signatures and cannot be directly decrypted
2018-03-12 12:39:32 -07:00
Andrew BussandKyle Isom a45f80f613 Working prototype using RO as a remote Signer for SSH authentication 2018-03-12 12:39:32 -07:00
Andrew BussandKyle Isom 5b9a4b2fcb Initial decrypt-sign support 2018-03-12 12:39:32 -07:00
Kyle SpiersandKyle Isom 746a508df1 Add validation on username
Signed-off-by: Kyle Spiers <kyle@spiers.me>
2017-11-27 09:59:43 -08:00
Daniel DaoandKyle Isom d77eb9a456 move server code to an importable package
Commit https://github.com/cloudflare/redoctober/commit/6f8424ad38982c92d64b9c70fb1e2e823aeb9f18
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 https://github.com/golang/go/commit/0f06d0a051714d14b923b0a9164ab1b3f463aa74,
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
Zi LinandGitHub 77e093946b Merge pull request #186 from cloudflare/nick/Ftof
Update License.
2017-02-14 12:22:45 -08:00
Nick Sullivan 7fb5610f35 Update License. 2017-02-14 12:17:09 -08:00
Zi LinandGitHub 9508cafd80 Merge pull request #185 from ferringb/cleanup-UI
static/index.html: Convert from single page to tabbed app
2017-01-09 10:25:36 -08:00
Brian Harring 767f3d3912 static/index.html: Convert from single page app to tabbed app.
The diff for this is a bit ugly due to indentation changes, but
essentially each navbar tag that exists, was converted into a tab.  From
there, only one tab is shown at a time- this makes navigation generally
suck less, and is visually less painful.

In parallel, the markup for each tab was adjusted to be more consistent.
2017-01-09 08:58:33 -08:00
Zi LinandKyle Isom 7d8077902b ro owner command should be robust with base64 encoded RedOctober encryption.
- We would avoid sending double base64 encoded request to server, triggering cryptic error message
2017-01-04 14:00:46 -08:00
Zi LinandKyle Isom 6b441d2e85 fix a casing in error message 2017-01-04 12:24:58 -08:00
Zi LinandKyle Isom 43ffe45e72 GetOwners returns labels on the encryption too 2017-01-04 12:24:58 -08:00
Zi LinandGitHub 1a1d8dec00 Merge pull request #182 from cloudflare/kyle/vendor-sentry
kyle/vendor sentry
2016-12-21 15:27:28 -08:00
Kyle Isom db2d698b74 Add raven-go to vendored packages. 2016-12-21 15:08:22 -08:00
Kyle IsomandGitHub 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 IsomandGitHub a2cd47445f Send hipchat message on startup (if configured). (#179)
+ If a valid hipchat configuration is provided, send a message when
  Red October has restarted.
+ If persistence is inactive, alert the channel that this is the case.
2016-12-06 17:49:54 -08:00
Kyle IsomandGitHub 7c4413ab4a Permit usernames with spaces. (#178)
+ We have an account with a space in it; the tool should accomodate
  this.

+ Additionally, support supplying only the username to the program.
2016-12-06 17:28:58 -08:00
Kyle IsomandGitHub 29dd3b2411 Fix the concurrent map write error. (#177)
+ Add a lock to the keycache.
+ Ensure that all instantiations of keycaches use New, rather
  than the old keycache.Cache{make()} construct. This no longer
  works with the lock in place.
+ Update travis to run the race detector on a few specific packages
  that should help identify this type of problem in the future.
2016-12-06 15:41:18 -08:00
Zi LinandGitHub 75dfb8ef6e Merge pull request #176 from gliptak/warnings1
Cleanup Go Report Card warnings
2016-11-09 14:41:47 -08:00
Gábor Lipták 6b9fad5e9d Cleanup Go Report Card warnings 2016-11-09 17:21:39 -05:00
Zi LinandKyle Isom 78e9720635 Zi/disable dead loop retry (#175)
* disable endless retry logic

- we should do the retry logic at application cmd/ro, cmd/ro will need to
  deal with keyboard interrupts as well

* update test self-signed certificate with a expiry of 100 years

* ro tool supports retries after getting delegation errors
2016-10-17 15:19:30 -07:00
Kyle IsomandGitHub 70d3edbf9d Add ReEncrypt test to integration test. (#172) 2016-10-13 13:04:26 -07:00
Daniel, Dao Quang MinhandKyle Isom f0610dfd75 make docker: build a docker image for redoctober (#159)
* make docker: build a docker image for redoctober

* add a convenient entrypoint to generate certificates out of the box

* add detection based on RO_CERTS and RO_KEYS

instead of detection based on the presence of RO_DATA, add RO_CERTS and RO_KEYS
which are paths to the ceritificates and keys so we can generate them more
effectively.

Signed-off-by: Daniel Dao <dqminh@cloudflare.com>

* dockerfile: bump golang to 1.7.1
2016-10-07 10:14:46 -07:00
Daniel, Dao Quang MinhandKyle Isom ad1d045520 Switch to cloudflare/backoff library (#174) 2016-10-03 10:44:55 -07:00
Kyle IsomandGitHub 988ad42f8e Merge pull request #173 from cloudflare/brendan/fix
Fix typo.
2016-09-19 00:12:52 -07:00
Brendan McMillion 7050c7c6aa Fix typo. 2016-09-18 20:01:13 -07:00
Zi LinandGitHub 73c19a03e3 Merge pull request #171 from cloudflare/kyle/usernames-in-error
Improve user names in delegation error.
2016-09-06 15:01:10 -07:00
Kyle Isom 59eac91639 Improve user names in delegation error.
When delegating to a group of users, Red October will return the
error "User not found" if the user can't be found. This makes it
difficult to figure out the user that couldn't be found. This change
goes through the list of users and includes all usernames that
couldn't be found in the error message.
2016-09-06 13:51:55 -07:00
Zi LinandGitHub 4f560dbd0c Merge pull request #170 from cloudflare/kyle/delegation-restore
Properly restore delegations.
2016-08-24 13:47:43 -07: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
jkroll-cfandGitHub a4b17c3d35 Merge pull request #168 from cloudflare/kyle/restore-endpoint-ui
Add the restoration function to the HTML UI and CLI.
2016-08-17 13:56:29 -07:00
Kyle Isom 198b6ddfab Restore doesn't require usage count.
Always delegate for 1 use.
2016-08-17 12:11:24 -07:00
Kyle Isom 0b506b14ed Don't vet vendored code.
Ideally, it would be vettable. Ideally, *this* codebase would be
golintable. But, here we are, and neither ideal matches reality. C'est
la vie.
2016-08-16 15:37:49 -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 4d7d8257e7 Add missing vendored files. 2016-08-16 14:59:05 -07:00
Kyle Isom 39e11fa81d Add the restoration function to the HTML UI.
+ Add a new restore UI box. When a user delegates successfully for a
  restoration, the current restoration state is returned.
+ Add the persistence state to the summary output.
+ Rename "ordernum" to "slot": this is a longstanding complaint about
  the UI, and I fixed it while I was mucking about with this PR.
2016-08-12 10:19:10 -07:00
Kyle IsomandGitHub 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 IsomandGitHub 014590054a Fix vendoring, round 2. (#166)
Remove submodule.
2016-08-10 12:24:36 -07:00
Kyle IsomandGitHub e7cb6d7d5e Update vendored packages. (#165) 2016-08-08 14:14:50 -07:00
jkroll-cfandGitHub 7dacca1d9c Merge pull request #163 from cloudflare/kyle/keycache-interface
kyle/keycache_feedback
2016-08-05 16:19:29 -07:00
Kyle Isom 5396cdc899 Address @jkroll-cf's feedback on keycache interface.
+ persistLabels moved from cryptor to persist package global.
+ Restore now explicitly checks for the case where there aren't enough
  shares to return `ErrRestoreDelegations`.
+ The users responsible for restoring the cache are now logged.
2016-08-05 15:23:10 -07:00