Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3735e9fa
Commit
3735e9fa
authored
Jun 22, 2018
by
Micaël Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply feedback
parent
e7415e3e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
doc/administration/pseudonymizer.md
doc/administration/pseudonymizer.md
+3
-1
ee/app/workers/pseudonymizer_worker.rb
ee/app/workers/pseudonymizer_worker.rb
+13
-3
ee/lib/pseudonymizer/dumper.rb
ee/lib/pseudonymizer/dumper.rb
+1
-0
No files found.
doc/administration/pseudonymizer.md
View file @
3735e9fa
...
@@ -22,7 +22,9 @@ To configure the pseudonymizer, you need to:
...
@@ -22,7 +22,9 @@ To configure the pseudonymizer, you need to:
-
Provide a manifest file that describes which fields should be included or
-
Provide a manifest file that describes which fields should be included or
pseudonymized (
[
example `manifest.yml` file
](
https://gitlab.com/gitlab-org/gitlab-ee/tree/master/config/pseudonymizer.yml
)
).
pseudonymized (
[
example `manifest.yml` file
](
https://gitlab.com/gitlab-org/gitlab-ee/tree/master/config/pseudonymizer.yml
)
).
-
Use an object storage
A default manifest is provided with the GitLab installation. Using a relative file path will be resolved from the Rails root.
Alternatively, you can use an absolute file path.
-
Use an object storage and specify the connection parameters in the
`pseudonymizer.upload.connection`
configuration option.
**For Omnibus installations:**
**For Omnibus installations:**
...
...
ee/app/workers/pseudonymizer_worker.rb
View file @
3735e9fa
...
@@ -3,8 +3,15 @@ class PseudonymizerWorker
...
@@ -3,8 +3,15 @@ class PseudonymizerWorker
include
CronjobQueue
include
CronjobQueue
def
perform
def
perform
abort
"The pseudonymizer is not available with this license."
unless
License
.
feature_available?
(
:pseudonymizer
)
unless
License
.
feature_available?
(
:pseudonymizer
)
abort
"The pseudonymizer is disabled."
unless
Gitlab
::
CurrentSettings
.
pseudonymizer_enabled?
Rails
.
logger
.
warn
(
"The pseudonymizer is not available with this license."
)
return
end
unless
unless
Gitlab
::
CurrentSettings
.
pseudonymizer_enabled?
Rails
.
logger
.
info
(
"The pseudonymizer is disabled."
)
return
end
options
=
Pseudonymizer
::
Options
.
new
(
options
=
Pseudonymizer
::
Options
.
new
(
config:
YAML
.
load_file
(
Gitlab
.
config
.
pseudonymizer
.
manifest
),
config:
YAML
.
load_file
(
Gitlab
.
config
.
pseudonymizer
.
manifest
),
...
@@ -14,7 +21,10 @@ class PseudonymizerWorker
...
@@ -14,7 +21,10 @@ class PseudonymizerWorker
dumper
=
Pseudonymizer
::
Dumper
.
new
(
options
)
dumper
=
Pseudonymizer
::
Dumper
.
new
(
options
)
uploader
=
Pseudonymizer
::
Uploader
.
new
(
options
,
progress_output:
File
.
open
(
File
::
NULL
,
"w"
))
uploader
=
Pseudonymizer
::
Uploader
.
new
(
options
,
progress_output:
File
.
open
(
File
::
NULL
,
"w"
))
abort
"The pseudonymizer object storage must be configured."
unless
uploader
.
available?
unless
uploader
.
available?
Rails
.
logger
.
error
(
"The pseudonymizer object storage must be configured."
)
return
end
begin
begin
dumper
.
tables_to_csv
dumper
.
tables_to_csv
...
...
ee/lib/pseudonymizer/dumper.rb
View file @
3735e9fa
...
@@ -24,6 +24,7 @@ module Pseudonymizer
...
@@ -24,6 +24,7 @@ module Pseudonymizer
@output_files
=
tables
.
map
do
|
k
,
v
|
@output_files
=
tables
.
map
do
|
k
,
v
|
table_to_csv
(
k
,
v
[
:whitelist
],
v
[
:pseudo
])
table_to_csv
(
k
,
v
[
:whitelist
],
v
[
:pseudo
])
end
.
compact
end
.
compact
schema_to_yml
schema_to_yml
file_list_to_json
file_list_to_json
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment