Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

[FC-0006] feat: Add settings for Verifiable Credentials #6928

Merged
merged 2 commits into from
May 31, 2023
Merged
Changes from 1 commit
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
30 changes: 30 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,26 @@ 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"

# TODO: Link to VC documentation
#
# TODO: Comment about adding wallet python module to CREDENTIALS_EXTRA_REQUIREMENTS variable
Copy link
Contributor

Choose a reason for hiding this comment

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

Could these todos be cleaned up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, resolved

The link to VC documentation was added. It's 404 as for now only because the documentation PR is still in review openedx/credentials#1991

#
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