This is an automated email from the git hooks/post-receive script.
clime pushed a change to branch dumpdb_without_sensitive_info
in repository copr/copr.
at cd4768d [frontend] helper script to dump coprdb data without sensitive
information
This branch includes the following new commits:
new cd4768d [frontend] helper script to dump coprdb data without sensitive
information
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date
This is an automated email from the git hooks/post-receive script.
clime pushed a commit to branch dumpdb_without_sensitive_info
in repository copr/copr.
commit cd4768d6285c09ad8208c464104262c7153b8b03
Author: clime <clime(a)redhat.com>
AuthorDate: Mon Nov 19 15:21:11 2018 +0100
[frontend] helper script to dump coprdb data without sensitive information
* The problem is that if someone adds a new sensitive column into db,
this script should be updated to leave out that information from dump.
---
frontend/coprs_frontend/run/filter-dump-coprdb | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/frontend/coprs_frontend/run/filter-dump-coprdb
b/frontend/coprs_frontend/run/filter-dump-coprdb
new file mode 100755
index 0000000..a6d2a25
--- /dev/null
+++ b/frontend/coprs_frontend/run/filter-dump-coprdb
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+createdb temporary_db >/dev/null
+
+pg_dump coprdb | psql temporary_db >/dev/null
+
+psql temporary_db <<< "UPDATE \"user\" SET mail='',
api_login='', api_token='', api_token_expiration=now()"
>/dev/null
+psql temporary_db <<< "UPDATE copr SET webhook_secret='',
scm_api_auth_json=''" >/dev/null
+
+pg_dump temporary_db
+
+dropdb temporary_db >/dev/null
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.