Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update add datagov_inventory extension #2681

Merged
merged 8 commits into from
Feb 11, 2021
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ newrelic_app_name: inventory-next
newrelic_enabled: true

inventory_ckan_plugins_additional: [s3filestore]
inventory_ckan_plugins_first: [datagov_inventory]

# saml2 authentication
inventory_ckan_saml2_enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ newrelic_app_name: inventory-next-sandbox
newrelic_enabled: false

inventory_ckan_plugins_additional: [saml2auth s3filestore]
inventory_ckan_plugins_first: [datagov_inventory]

# saml2 authentication
inventory_ckan_saml2_enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ newrelic_app_name: inventory-next-staging
newrelic_enabled: true

inventory_ckan_plugins_additional: [saml2auth s3filestore]
inventory_ckan_plugins_first: [datagov_inventory]

# saml2 authentication
inventory_ckan_saml2_enabled: true
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/software/ckan/inventory/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ckan_virtual_env: "{{virtual_env}}"
datapusher_virtual_env: /usr/lib/datapusher
app_type: inventory

inventory_ckan_plugins_first: []
inventory_ckan_plugins_additional: []
inventory_ckan_plugins_default:
- datajson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# following URL for a description of what they do and the full list of
# available options:
#
# http://docs.ckan.org/en/latest/configuration.html
# https://docs.ckan.org/en/latest/maintaining/configuration.html
#
# The %(here)s variable will be replaced with the parent directory of this file
#
Expand Down Expand Up @@ -85,8 +85,9 @@ ckan.auth.user_create_organizations = false
ckan.auth.user_delete_groups = false
ckan.auth.user_delete_organizations = false
ckan.auth.create_user_via_api = false
ckan.auth.create_user_via_web = true
ckan.auth.create_user_via_web = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FuhuXia can you confirm with the saml extension this is the correct setting? Or do we want something else?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of now, saml2 extension is using a separated production.ini template. So any time we make changes to production.ini file, the same changes need to be applied to ansible/roles/software/ckan/inventory/templates/inventory-next/etc_ckan_production.ini.j2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we should update inventory-next/etc_ckan_production.ini.j2 in this PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, although I doubt this will have any effect on saml login behaviour. But for consistency, we need to keep two production.j2 synchronized.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated ansible/roles/software/ckan/inventory/templates/inventory-next/etc_ckan_production.ini.j2 with the changes.

ckan.auth.roles_that_cascade_to_sub_groups = admin
ckan.auth.public_user_details = false

## Search Settings

Expand All @@ -108,7 +109,10 @@ ckan.redis.url = {{ inventory_ckan_redis_url}}
# Add ``pdf_preview`` to enable the resource preview for PDFs
# Add ``resource_proxy`` to enable resorce proxying and get around the
# same origin policy
ckan.plugins = {{ (inventory_ckan_plugins_default + inventory_ckan_plugins_additional ) | join(' ') }}
ckan.plugins = {{ (inventory_ckan_plugins_first + inventory_ckan_plugins_default +
inventory_ckan_plugins_additional) | join(' ') }}



ckan.views.default_views = recline_view text_view image_view webpage_view recline_grid_view

Expand Down