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

feat: Add settings for Verifiable Credentials #222

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions playbooks/roles/credentials/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ CREDENTIALS_FILE_STORAGE_BACKEND: {}
CREDENTIALS_CORS_ORIGIN_ALLOW_ALL: false
CREDENTIALS_CORS_ORIGIN_WHITELIST_DEFAULT:
- '{{ CREDENTIALS_DOMAIN }}'
- '{{ CREDENTIALS_LEARNER_RECORD_MFE_HOSTNAME }}'

CREDENTIALS_CORS_ORIGIN_WHITELIST_EXTRA: []
CREDENTIALS_CORS_ORIGIN_WHITELIST: '{{ CREDENTIALS_CORS_ORIGIN_WHITELIST_DEFAULT + CREDENTIALS_CORS_ORIGIN_WHITELIST_EXTRA }}'
Expand All @@ -124,8 +125,12 @@ credentials_service_config_overrides:
CREDENTIALS_SERVICE_USER: '{{ CREDENTIALS_SERVICE_USER }}'
FILE_STORAGE_BACKEND: '{{ CREDENTIALS_FILE_STORAGE_BACKEND }}'
LANGUAGE_COOKIE_NAME: '{{ CREDENTIALS_LANGUAGE_COOKIE_NAME }}'
USE_LEARNER_RECORD_MFE: '{{ CREDENTIALS_USE_LEARNER_RECORD_MFE }}'
LEARNER_RECORD_MFE_RECORDS_PAGE_URL: "https://{{ CREDENTIALS_LEARNER_RECORD_MFE_HOSTNAME }}/"
CSRF_COOKIE_SECURE: "{{ CREDENTIALS_CSRF_COOKIE_SECURE }}"
CSRF_TRUSTED_ORIGINS: "{{ CREDENTIALS_CSRF_TRUSTED_ORIGINS }}"
USERNAME_REPLACEMENT_WORKER: "{{ CREDENTIALS_USERNAME_REPLACEMENT_WORKER }}"
VERIFIABLE_CREDENTIALS: "{{ CREDENTIALS_VERIFIABLE_CREDENTIALS }}"

# See edx_django_service_automated_users for an example of what this should be
CREDENTIALS_AUTOMATED_USERS: {}
Expand All @@ -137,6 +142,8 @@ CREDENTIALS_LMS_URL_ROOT: !!null
CREDENTIALS_DISCOVERY_API_URL: !!null

CREDENTIALS_CSRF_COOKIE_SECURE: false
CREDENTIALS_CSRF_TRUSTED_ORIGINS:
- "{{ CREDENTIALS_LEARNER_RECORD_MFE_HOSTNAME }}"

CREDENTIALS_ENABLE_NEWRELIC_DISTRIBUTED_TRACING: false

Expand All @@ -155,3 +162,25 @@ CREDENTIALS_COPY_CONFIG_ENABLED: "{{ COMMON_COPY_CONFIG_ENABLED }}"
CREDENTIALS_ENABLE_ADMIN_URLS_RESTRICTION: false
CREDENTIALS_ADMIN_URLS:
- admin

CREDENTIALS_USE_LEARNER_RECORD_MFE: false
CREDENTIALS_LEARNER_RECORD_MFE_HOSTNAME: "learner-record.mfe.CHANGE-ME"

# NOTE: Optional Verifiable Credentials feature
# Documentation can be found at
# https://edx-credentials.readthedocs.io/en/latest/verifiable_credentials/overview.html
CREDENTIALS_VERIFIABLE_CREDENTIALS:
DEFAULT_DATA_MODELS:
- "credentials.apps.verifiable_credentials.composition.verifiable_credentials.VerifiableCredentialsDataModel"
- "credentials.apps.verifiable_credentials.composition.open_badges.OpenBadgesDataModel"
DEFAULT_STORAGES:
- "credentials.apps.verifiable_credentials.storages.learner_credential_wallet.LCWallet"
DEFAULT_ISSUER:
NAME: "Default (system-wide)"
ID: "generate-me-with-didkit-lib"
KEY: "generate-me-with-didkit-lib"
DEFAULT_ISSUANCE_REQUEST_SERIALIZER: "credentials.apps.verifiable_credentials.issuance.serializers.IssuanceLineSerializer"
DEFAULT_RENDERER: "credentials.apps.verifiable_credentials.issuance.renderers.JSONLDRenderer"
STATUS_LIST_STORAGE: "credentials.apps.verifiable_credentials.storages.status_list.StatusList2021"
STATUS_LIST_DATA_MODEL: "credentials.apps.verifiable_credentials.composition.status_list.StatusListDataModel"
STATUS_LIST_LENGTH: 10000