Skip to content

Commit

Permalink
Merge pull request #3771 from chef/onetrust-config
Browse files Browse the repository at this point in the history
Make onetrust key configurable
  • Loading branch information
jashaik authored Mar 11, 2024
2 parents 6e9ce63 + 1841553 commit 54e5bc5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,14 @@ This configuration file has the following settings for `oc-id`:

**New in Chef Infra Server 15.9.20**

`oc_id['onetrust_id']`

: The OneTrust data domain script ID for Chef Infra. You must also set `oc_id['enable_onetrust']` to `true`.

Default value: `nil`.

**New in Chef Infra Server 15.9.22**

`oc_id['log_directory']`

: The directory in which log data is stored. The default value is the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@
default['private_chef']['oc_id']['email_from_address'] = node['private_chef']['from_email']
default['private_chef']['oc_id']['origin'] = node['private_chef']['api_fqdn']
default['private_chef']['oc_id']['enable_onetrust'] = false
default['private_chef']['oc_id']['onetrust_id'] = nil

default['private_chef']['oc_id']['administrators'] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
'email_from_address' => node['private_chef']['oc_id']['email_from_address'],
'origin' => node['private_chef']['oc_id']['origin'],
'enable_onetrust' => node['private_chef']['oc_id']['enable_onetrust'],
'onetrust_id' => node['private_chef']['oc_id']['onetrust_id'] || '',
}

oc_id_dir = node['private_chef']['oc_id']['dir']
Expand Down
5 changes: 2 additions & 3 deletions src/oc-id/app/views/application/_analytics.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<% if onetrust_enabled? %>
<!-- Onetrust Script -->
<script async src="https://cdn.cookielaw.org/consent/e231efa5-3ed9-4b92-96bc-f4c0872ca486/otSDKStub.js" type="text/javascript" charset="UTF-8" data-domain-script="e231efa5-3ed9-4b92-96bc-f4c0872ca486"></script>
<% if onetrust_enabled? && ENV['ONETRUST_ID'].present? %>
<%= javascript_include_tag "https://cdn.cookielaw.org/consent/#{ENV['ONETRUST_ID']}/otSDKStub.js", charset: "UTF-8", "data-domain-script": "#{ENV['ONETRUST_ID']}" %>
<% end %>

0 comments on commit 54e5bc5

Please sign in to comment.