345 Commits

Author SHA1 Message Date
Nicky Semenza
ce2ad37062 Merge pull request #213 from cloudflare/hrushikeshdeshpande-updating-semgrep-yml
Update semgrep.yml
2024-11-12 08:51:58 -08:00
hrushikeshdeshpande
b2eeab0daa Update semgrep.yml
Updating Semgrep.yml file - Semgrep is a tool that will be used to scan Cloudflare's public repos for Supply chain, code and secrets. This work is part of Application & Product Security team's initiative to onboard Semgrep onto all of Cloudflare's public repos.

In case of any questions, please reach out to "Hrushikesh Deshpande" on cf internal chat.
2024-09-21 17:10:24 -04:00
Hrushikesh Deshpande
ecd6febe99 Adding semgrep yaml file 2024-09-16 10:06:10 -04:00
Hrushikesh Deshpande
9382bf4ee6 Adding semgrep yaml file 2024-09-16 10:05:23 -04:00
Mihir Jham
deb1d5563c Merge pull request #211 from wolfmd/wolfmd/add-cn-to-testdata-cert
Replace testdata cert with a certificate that includes a CN
2023-10-30 08:32:35 -07:00
Michael Wolf
2e296311bc Replace testdata cert with a certificate that includes a CN
When attempting to build redoctober with a modern version of go
I was getting the following error in the tests:

x509: certificate relies on legacy Common Name field, use SANs

In looking at the existing test certificate, it is indeed
missing a SAN as it was probably generated as a oneliner with
the openssl CLI

```
   Issuer: C = US, ST = CA, L = Everywhere, O = Internet Widgits Pty Ltd, CN = localhost
   Validity
       Not Before: Oct 12 12:19:40 2016 GMT
       Not After : Sep 18 12:19:40 2116 GMT
   Subject: C = US, ST = CA, L = Everywhere, O = Internet Widgits Pty Ltd, CN = localhost
   Subject Public Key Info:
       Public Key Algorithm: rsaEncryption
           Public-Key: (2048 bit)
           Modulus:
              ...
           Exponent: 65537 (0x10001)
```

This remedies the issue by generating a new self-signed test
certificate which does include a SAN
```
$ cat cert.conf
[CA_default]
copy_extensions = copy

[req]
default_bits = 4096
prompt = no
default_md = sha256
distinguished_name = req_distinguished_name
x509_extensions = v3_ca

[req_distinguished_name]
C = US
ST = CA
L = Everywhere
O = Internet Widgits Pty Ltd
CN = localhost

[v3_ca]
basicConstraints = CA:FALSE
keyUsage = digitalSignature, keyEncipherment
subjectAltName = @alternate_names

[alternate_names]
DNS.1 = localhost
DNS.2 = *.localhost
DNS.3 = app.localhost

$ openssl req -x509 -newkey rsa:4096 -sha256 -utf8 -days 36500 -nodes -config cert.conf -keyout testdata/server.pem -out testdata/server.crt
...
$ cat testdata/server.crt | openssl x509 -noout -text
   Issuer: C = US, ST = CA, L = Everywhere, O = Internet Widgits Pty Ltd, CN = localhost
   Validity
       Not Before: Oct 26 22:33:24 2023 GMT
       Not After : Oct  2 22:33:24 2123 GMT
   Subject: C = US, ST = CA, L = Everywhere, O = Internet Widgits Pty Ltd, CN = localhost
   Subject Public Key Info:
       Public Key Algorithm: rsaEncryption
           Public-Key: (4096 bit)
           Modulus:
              ...
           Exponent: 65537 (0x10001)
   X509v3 extensions:
       X509v3 Basic Constraints:
           CA:FALSE
       X509v3 Key Usage:
           Digital Signature, Key Encipherment
       X509v3 Subject Alternative Name:
           DNS:localhost, DNS:*.localhost, DNS:app.localhost
       X509v3 Subject Key Identifier:
           1B:9B:11:0E:14:2E:D6:7D:57:4F:5D:29:CB:5B:16:01:80:34:9C:0A
```

This allows the tests to complete without running into that x509
exception or needing to set a flag in the build args to ignore it
2023-10-26 15:45:59 -07:00
Nicky Semenza
6a74ccc611 Merge pull request #205 from cloudflare/nicky/go-tidy
upgrade deprecated sentry dependency
2021-10-13 16:46:31 -07:00
Nicky Semenza
9f622518d8 switch deprecated raven-go to sentry-go
problematic for transitive deps due to it not using go modules, was throwing
2021-10-13 16:40:48 -07:00
Nicky Semenza
78b3b3f353 chore: run go mod tidy 2021-10-13 16:30:36 -07:00
Nicky Semenza
2fbbde0b1d Merge pull request #203 from cloudflare/nicky/routine-upgrades
chore: switch dep -> mod, go 1.12 -> 1.16, travis -> actions upgrade deps
2021-10-13 16:13:43 -07:00
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
Nicky Semenza
730c286fd5 switch from dep to mod 2021-10-13 08:22:27 -07:00
Nicky Semenza
99c99a8e75 Merge pull request #200 from dthadi3/master 2020-10-13 14:40:28 -07:00
dthadi3
e188958ee7 Update .travis.yml
Added power architecture
2020-10-12 09:30:53 +05:30
dthadi3
6316205585 Update .travis.yml 2020-10-12 09:29:07 +05:30
Ryan Carter
34d894fcc2 Merge pull request #199 from jmmcatee/master
Updating README.md
2020-01-17 10:03:38 -08:00
Michael McAtee
0788ed7009 Updating README.md 2020-01-16 15:52:21 -06:00
Chris Broglie
5186f264f3 Merge pull request #198 from mihirjham/mihir/fix-ci
update(travis): Bump up go version to 1.12 to see if travis builds pass
2020-01-15 16:36:51 -08:00
Mihir Jham
24271586c9 update(travis): Bump up go version to 1.12 to see if travis builds pass 2020-01-15 16:21:02 -08:00
Ryan Carter
197769656f Merge pull request #197 from mihirjham/mihir/sanitize-summary
update(core): Sanitizied the output of Summary to remove key material
2020-01-15 09:44:18 -08:00
Mihir Jham
672eef54f4 update(core): Sanitizied the output of Summary to remove key material 2020-01-14 17:21:53 -08:00
Ryan Carter
3f826eedb6 Merge pull request #194 from cloudflare/eiginn/go-systemd-update
Eiginn/go systemd update
2018-09-28 14:40:28 -07:00
Ryan Carter
ff51806d17 Convert to dep from gvt 2018-09-17 12:58:22 -07:00
Ryan Carter
25606b1b5f Update vendored go-systemd/activation package
And fix call to activation.Listeners
2018-09-14 13:26:52 -07:00
Mahrud Sayrafi
c0b30b638a user/pass prompts from ro-ssh-agent are printed to stderr 2018-03-12 12:39:32 -07:00
Mahrud Sayrafi
b1fdf6d637 RO SSH Agent Forwarding Works
Well, technically it already worked once the ROAgent.List method
was working.
2018-03-12 12:39:32 -07:00
Mahrud Sayrafi
998d924d79 ssh-add mode is introduced, ssh-agent mode is polished
See the last paragraph in README.md for an example.
2018-03-12 12:39:32 -07:00
Mahrud Sayrafi
3fc06e3b12 New functions (AddROSigner, etc.) and data structures for ROAgent.
Almost compatible with ssh-add now.
2018-03-12 12:39:32 -07:00
Mahrud Sayrafi
433afa9574 Replaced ssh subcommand with a working ssh-agent subcommand 2018-03-12 12:39:32 -07:00
Mahrud Sayrafi
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 Buss
9a49b3a39e Rebasing fixups 2018-03-12 12:39:32 -07:00
Andrew Buss
370d8c6d3b Ran goimports on the whole project. No functional changes 2018-03-12 12:39:32 -07:00
Andrew Buss
7fb0228c2a Addressed comments
Addressed comments
2018-03-12 12:39:32 -07:00
Andrew Buss
186092a44e Renamed DecryptSign -> SSHSignWith, added tests for SSHSignWith and Usages 2018-03-12 12:39:32 -07:00
Andrew Buss
4571399c6f Include Usages field when computing HMAC 2018-03-12 12:39:32 -07:00
Andrew Buss
2e2ee53f30 Added Usages field to web interface 2018-03-12 12:39:32 -07:00
Andrew Buss
bba026d535 Added SSH authentication example to README 2018-03-12 12:39:32 -07:00
Andrew Buss
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 Buss
a45f80f613 Working prototype using RO as a remote Signer for SSH authentication 2018-03-12 12:39:32 -07:00
Andrew Buss
5b9a4b2fcb Initial decrypt-sign support 2018-03-12 12:39:32 -07:00
Kyle Spiers
746a508df1 Add validation on username
Signed-off-by: Kyle Spiers <kyle@spiers.me>
2017-11-27 09:59:43 -08: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
Zi Lin
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 Lin
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 Lin
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 Lin
6b441d2e85 fix a casing in error message 2017-01-04 12:24:58 -08:00
Zi Lin
43ffe45e72 GetOwners returns labels on the encryption too 2017-01-04 12:24:58 -08:00