Skip to content

Commit 8298ce4

Browse files
committed
turn back on ssl on couchdb
1 parent 4244a73 commit 8298ce4

5 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: Create local config for tests
3333
run: |
34-
echo 'module.exports = { usersDbConnection: { url: "http://localhost:5984" }};' > config/local.js
34+
echo 'module.exports = { usersDbConnection: { url: "https://localhost:6984" }};' > config/local.js
3535
3636
- name: Run Integration tests
3737
run: DEBUG=replay* npm run coverage || echo 'Test run failed replay no longer is working with latest nano which uses node fetch'

Dockerfile-couchdb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM couchdb:3.5.1
33
WORKDIR /
44

55
COPY etc/* /opt/couchdb/etc/
6+
COPY config/ssl_debug.* /opt/couchdb/etc/
67

78
RUN set +x; \
89
curl -X PUT http://admin:none@127.0.0.1:5984/_users; \

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ services:
1313
dockerfile: ./Dockerfile-couchdb
1414
ports:
1515
- 5984:5984
16+
- 6984:6984
1617
environment:
1718
- COUCHDB_USER=admin
1819
- COUCHDB_PASSWORD=none

etc/local.ini

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,20 @@ admin = -pbkdf2-3f04b4318f9a5b3c20ff99fa9194744d0cffa603,e5fbfb69d2a5db31325d234
1414

1515
[replicator]
1616
auth_plugins = couch_replicator_auth_noop
17+
18+
[daemons]
19+
; enable SSL support by uncommenting the following line and supply the PEM's below.
20+
; the default ssl port CouchDB listens on is 6984
21+
httpsd = {couch_httpd, start_link, [https]}
22+
23+
[ssl]
24+
enable = true
25+
; ciphers = undefined
26+
;tls_versions = undefined
27+
; secure_renegotiate = undefined
28+
cert_file = /opt/couchdb/etc/ssl_debug.crt
29+
key_file = /opt/couchdb/etc/ssl_debug.key
30+
; set to true to validate peer certificates
31+
verify_ssl_certificates = false
32+
; maximum peer certificate depth
33+
ssl_certificate_max_depth = 1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"docker:build": "docker build -t fielddb-auth .",
6565
"docker:test": "echo 'module.exports = { usersDbConnection: { url: \"http://localhost:5984\" } };' > config/local.js && docker compose up -d && sleep 3 && docker compose logs && npm run setup && npm run test:deprecated",
6666
"docker:test:no-cache": "echo 'module.exports = { usersDbConnection: { url: \"http://localhost:5984\" } };' > config/local.js && docker compose build --no-cache && docker compose up -d && sleep 15 && docker compose logs && npm run setup && npm run test:deprecated",
67-
"coverage": "NODE_ENV=test BUNYAN_LOG_LEVEL=FATAL NODE_TLS_REJECT_UNAUTHORIZED=0 nyc npm test",
67+
"coverage": "NODE_ENV=test BUNYAN_LOG_LEVEL=FATAL nyc npm test",
6868
"lint": "eslint ",
6969
"lint:ci": "eslint .",
7070
"setup": "REPLAY=bloody SOURCE_URL=${SOURCE_URL:-https://public:none@corpusdev.example.org} mocha --timeout 20000 test/integration/install.js",

0 commit comments

Comments
 (0)