diff --git a/.env b/.env index b61d2f9bd..171d92647 100644 --- a/.env +++ b/.env @@ -15,3 +15,4 @@ DDS_UPLOAD_TEST="./run_dir/upload" DDS_DOWNLOAD_TEST="./run_dir/download" DDS_TEMP_CACHE_TEST="./run_dir/cache_test" DDS_DB_TYPE="dev-small" # "dev-big production" +FLASK_MAIL_DDS=nima.rafati@epigenica.se \ No newline at end of file diff --git a/.github/assets/4_crop.png b/.github/assets/4_crop.png new file mode 100644 index 000000000..af9cf60dc Binary files /dev/null and b/.github/assets/4_crop.png differ diff --git a/.github/assets/5.png b/.github/assets/5.png new file mode 100644 index 000000000..2c592e4e4 Binary files /dev/null and b/.github/assets/5.png differ diff --git a/.github/assets/7_crop.png b/.github/assets/7_crop.png new file mode 100644 index 000000000..e3512e712 Binary files /dev/null and b/.github/assets/7_crop.png differ diff --git a/.github/assets/README.me b/.github/assets/README.me new file mode 100644 index 000000000..e05f6f6f6 --- /dev/null +++ b/.github/assets/README.me @@ -0,0 +1 @@ +Here are files related to logos and website layout for Epigenica. diff --git a/.github/workflows/publish_and_trivyscan.yml b/.github/workflows/publish_and_trivyscan.yml index 27a56f6b6..210d0dee2 100644 --- a/.github/workflows/publish_and_trivyscan.yml +++ b/.github/workflows/publish_and_trivyscan.yml @@ -72,7 +72,7 @@ jobs: texlive-fonts-recommended - name: Build troubleshooting guide run: | - pandoc --output=dds_web/static/dds-troubleshooting.pdf docs/troubleshooting.md + pandoc --output=dds_web/static/dds-troubleshooting.pdf docs/troubleshooting_epigenica.md - name: Upload troubleshooting PDF uses: actions/upload-artifact@v7 with: @@ -80,7 +80,7 @@ jobs: path: dds_web/static/dds-troubleshooting.pdf push_to_registry: needs: [build_tech_overview, build_troubleshooting] - if: github.repository == 'ScilifelabDataCentre/dds_web' + if: github.repository == 'epigenica/dds_web' name: Push image runs-on: ubuntu-latest permissions: @@ -109,12 +109,23 @@ jobs: with: name: troubleshooting-pdf path: dds_web/static + - name: Extract dds_web version + id: dds_version + run: | + VERSION=$(grep -Po '(?<=__version__ = ")[^"]+' dds_web/version.py) + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Docker metadata id: meta uses: docker/metadata-action@v6 with: images: | - ghcr.io/scilifelabdatacentre/dds-backend + ghcr.io/epigenica/dds-backend + tags: | + type=raw,value=${{ steps.dds_version.outputs.version }},enable=${{ github.ref_name == 'dev' }} + type=ref,event=branch,enable=${{ github.ref_name != 'dev' }} + type=ref,event=tag + type=sha - name: Ensure lowercase name run: echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV - name: Build for scan @@ -147,6 +158,6 @@ jobs: file: Dockerfiles/backend.Dockerfile context: . push: true - build-args: version=${{ github.ref_name }} + build-args: version=${{ steps.dds_version.outputs.version }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/dds_web/__init__.py b/dds_web/__init__.py index f2c055969..6ba48df8d 100644 --- a/dds_web/__init__.py +++ b/dds_web/__init__.py @@ -13,6 +13,7 @@ # Installed import flask +from jinja2 import ChoiceLoader, FileSystemLoader from flask_sqlalchemy import SQLAlchemy from flask_marshmallow import Marshmallow from logging.config import dictConfig @@ -253,6 +254,17 @@ def create_app(testing=False, database_uri=None): # Initiate app object app = flask.Flask(__name__, instance_relative_config=False) + # Brand override templates — checked before the default templates/ folder. + # Place only the files you want to override in templates_brand/; everything + # else is still served from the upstream templates/ directory. + _brand_templates = pathlib.Path(__file__).parent / "templates_brand" + app.jinja_loader = ChoiceLoader( + [ + FileSystemLoader(str(_brand_templates)), + app.jinja_loader, + ] + ) + # All variables in the env that start with FLASK_* will be loaded into the app config # 'FLASK_' will be dropped, e.g. FLASK_TESTVAR will be loaded as TESTVAR app.config.from_prefixed_env() diff --git a/dds_web/api/project.py b/dds_web/api/project.py index 25f899970..ec05e4da0 100644 --- a/dds_web/api/project.py +++ b/dds_web/api/project.py @@ -890,7 +890,7 @@ def delete_project_contents(project_id, delete_bucket=False): ) as sqlerr: error_msg = ( "Project bucket contents were deleted, but they were not deleted from the " - "database. Please contact SciLifeLab Data Centre." + "database. Please contact Epigenica support." + ( "Database malfunction." if isinstance(sqlerr, sqlalchemy.exc.OperationalError) diff --git a/dds_web/api/user.py b/dds_web/api/user.py index 41f299d39..95174dfe3 100644 --- a/dds_web/api/user.py +++ b/dds_web/api/user.py @@ -444,9 +444,9 @@ def compose_and_send_email_to_user(userobj, mail_type, link=None, project=None): # Fill in email subject with sentence subject if mail_type == "invite": - subject = f"{displayed_sender} invites you to the SciLifeLab Data Delivery System" + subject = f"{displayed_sender} invites you to the Epigenica Data Delivery System" elif mail_type == "project_release": - subject = f"Project made available by {displayed_sender} in the SciLifeLab Data Delivery System" + subject = f"Project made available by {displayed_sender} in the Epigenica Data Delivery System" project_id = project.public_id project_title = project.title deadline = project.current_deadline.astimezone(datetime.timezone.utc).strftime( @@ -462,10 +462,11 @@ def compose_and_send_email_to_user(userobj, mail_type, link=None, project=None): # Need to attach the image to be able to use it msg.attach( - "scilifelab_logo.png", + "epigenica_logo_light_bg.png", "image/png", open( - os.path.join(flask.current_app.static_folder, "img/scilifelab_logo.png"), "rb" + os.path.join(flask.current_app.static_folder, "img/epigenica_logo_light_bg.png"), + "rb", ).read(), "inline", headers=[ @@ -583,7 +584,7 @@ def delete(self): # Create link for deletion request email link = flask.url_for("auth_blueprint.confirm_self_deletion", token=token, _external=True) - subject = f"Confirm deletion of your user account {username} in the SciLifeLab Data Delivery System" + subject = f"Confirm deletion of your user account {username} in the Epigenica Data Delivery System" msg = flask_mail.Message( subject, @@ -592,10 +593,11 @@ def delete(self): # Need to attach the image to be able to use it msg.attach( - "scilifelab_logo.png", + "epigenica_logo_light_bg.png", "image/png", open( - os.path.join(flask.current_app.static_folder, "img/scilifelab_logo.png"), "rb" + os.path.join(flask.current_app.static_folder, "img/epigenica_logo_light_bg.png"), + "rb", ).read(), "inline", headers=[ @@ -1139,7 +1141,7 @@ def post(self): recipients = [user.primary_email] # Fill in email subject with sentence subject - subject = f"Request to activate two-factor with authenticator app for SciLifeLab Data Delivery System" + subject = f"Request to activate two-factor with authenticator app for Epigenica Data Delivery System" msg = flask_mail.Message( subject, @@ -1148,10 +1150,11 @@ def post(self): # Need to attach the image to be able to use it msg.attach( - "scilifelab_logo.png", + "epigenica_logo_light_bg.png", "image/png", open( - os.path.join(flask.current_app.static_folder, "img/scilifelab_logo.png"), "rb" + os.path.join(flask.current_app.static_folder, "img/epigenica_logo_light_bg.png"), + "rb", ).read(), "inline", headers=[ @@ -1204,7 +1207,7 @@ def post(self): recipients = [user.primary_email] # Fill in email subject with sentence subject - subject = f"Request to activate two-factor authentication with email for SciLifeLab Data Delivery System" + subject = f"Request to activate two-factor authentication with email for Epigenica Data Delivery System" msg = flask_mail.Message( subject, @@ -1213,10 +1216,11 @@ def post(self): # Need to attach the image to be able to use it msg.attach( - "scilifelab_logo.png", + "epigenica_logo_light_bg.png", "image/png", open( - os.path.join(flask.current_app.static_folder, "img/scilifelab_logo.png"), "rb" + os.path.join(flask.current_app.static_folder, "img/epigenica_logo_light_bg.png"), + "rb", ).read(), "inline", headers=[ diff --git a/dds_web/forms.py b/dds_web/forms.py index 0eabff3ff..9d56cf8fe 100644 --- a/dds_web/forms.py +++ b/dds_web/forms.py @@ -68,7 +68,7 @@ class RegistrationForm(flask_wtf.FlaskForm): ) policy_checkbox = wtforms.BooleanField( - "I have read and agree to the Privacy Policy and User Agreement documents linked above.", + "I have read and agree to the Privacy Policy linked above.", validators=[ wtforms.validators.DataRequired(message="Please agree to the conditions."), ], diff --git a/dds_web/static/img/epigenica_logo_dark_bg.png b/dds_web/static/img/epigenica_logo_dark_bg.png new file mode 100644 index 000000000..ba3f97f90 Binary files /dev/null and b/dds_web/static/img/epigenica_logo_dark_bg.png differ diff --git a/dds_web/static/img/epigenica_logo_dark_bg.svg b/dds_web/static/img/epigenica_logo_dark_bg.svg new file mode 100644 index 000000000..841b564ac --- /dev/null +++ b/dds_web/static/img/epigenica_logo_dark_bg.svg @@ -0,0 +1,4 @@ + + + Epigenica + diff --git a/dds_web/static/img/epigenica_logo_light_bg.png b/dds_web/static/img/epigenica_logo_light_bg.png new file mode 100644 index 000000000..91d0da3ee Binary files /dev/null and b/dds_web/static/img/epigenica_logo_light_bg.png differ diff --git a/dds_web/static/img/epigenica_logo_light_bg.svg b/dds_web/static/img/epigenica_logo_light_bg.svg new file mode 100644 index 000000000..d00996555 --- /dev/null +++ b/dds_web/static/img/epigenica_logo_light_bg.svg @@ -0,0 +1,4 @@ + + + Epigenica + diff --git a/dds_web/static/scss/_brand_overrides.scss b/dds_web/static/scss/_brand_overrides.scss new file mode 100644 index 000000000..5e3d966f1 --- /dev/null +++ b/dds_web/static/scss/_brand_overrides.scss @@ -0,0 +1,61 @@ +// ============================================================================= +// Brand overrides +// ============================================================================= +// This file is intentionally NOT present in the upstream SciLifeLab/dds_web +// repository. It is the single place to customise colours, typography, and +// other Bootstrap/DDS variables for this deployment. +// +// HOW IT WORKS +// _variables.scss (upstream) – sets SciLifeLab defaults +// _brand_overrides.scss (this) – shadows any variable you uncomment below +// bootstrap/scss/bootstrap – Bootstrap !default declarations lose to both +// +// USAGE +// Uncomment a line, set your value, done. Upstream merges will never touch +// this file, so conflicts are impossible. +// +// COLOUR REFERENCE (upstream SciLifeLab palette) +// Teal #045C64 $primary +// Grape #491F53 $secondary +// Lime #A7C947 $success +// Aqua #4C979F $info +// ============================================================================= + +// -- Light-mode colours ------------------------------------------------------- +// $primary: #045c64; +// $secondary: #491f53; +// $success: #a7c947; +// $info: #4c979f; + +// -- Dark-mode colour variants ------------------------------------------------ +// $primary-alt: #75b3b9; +// $secondary-alt: #491f53; +// $success-alt: #a7c947; +// $info-alt: #4c979f; +// $light-alt: #343a40; + +// -- Typography --------------------------------------------------------------- +// Replace the first entry to swap the primary web font. +// Keep the rest of the stack intact so fallbacks still work. +// +// $font-family-sans-serif: +// "Your Font Here", +// system-ui, +// -apple-system, +// BlinkMacSystemFont, +// "Segoe UI", +// Roboto, +// "Helvetica Neue", +// Arial, +// "Noto Sans", +// "Liberation Sans", +// sans-serif, +// "Apple Color Emoji", +// "Segoe UI Emoji", +// "Segoe UI Symbol", +// "Noto Color Emoji" !default; + +// -- Bootstrap component tweaks ----------------------------------------------- +// $border-radius: 0.2rem; +// $navbar-nav-link-padding-x: 1rem; +// $form-floating-label-opacity: 0.4; diff --git a/dds_web/static/scss/dds_dark.scss b/dds_web/static/scss/dds_dark.scss index c2534a875..368b19b6e 100644 --- a/dds_web/static/scss/dds_dark.scss +++ b/dds_web/static/scss/dds_dark.scss @@ -4,6 +4,9 @@ // Import our variables - stuff like colours etc @import "variables"; +// Brand-specific overrides (not present in upstream — safe to sync) +@import "brand_overrides"; + // // Bootstrap-5-dark // Based on bootstrap-night.scss with fixed import paths diff --git a/dds_web/static/scss/dds_light.scss b/dds_web/static/scss/dds_light.scss index 8451a8c42..09411bd66 100644 --- a/dds_web/static/scss/dds_light.scss +++ b/dds_web/static/scss/dds_light.scss @@ -4,6 +4,9 @@ // Import our variables - stuff like colours etc @import "variables"; +// Brand-specific overrides (not present in upstream — safe to sync) +@import "brand_overrides"; + // Import all of Bootstrap's SCSS @import "bootstrap/scss/bootstrap"; diff --git a/dds_web/templates_brand/404.html b/dds_web/templates_brand/404.html new file mode 100644 index 000000000..0c181c6bd --- /dev/null +++ b/dds_web/templates_brand/404.html @@ -0,0 +1,18 @@ +{% extends 'base.html' %} + +{% block page_title -%} +404: Page not found +{%- endblock %} + +{% block body %} + + + +

Sorry, that page cannot be found: {{ request.base_url }}

+ +

+ You can get back to the homepage here. + If in doubt, please get in touch with support at data.team@epigenica.se. +

+ +{% endblock %} diff --git a/dds_web/templates_brand/base.html b/dds_web/templates_brand/base.html new file mode 100644 index 000000000..05467572d --- /dev/null +++ b/dds_web/templates_brand/base.html @@ -0,0 +1,108 @@ + + + + + + + + + + + {% block page_title %}Data Delivery System{% endblock %} + + + + {% include 'components/navbar.html' %} + +
+ {% if g.motd %} + + {% endif %} +
+ +
+ + {%if self.page_title() != "Data Delivery System" %}

{{ self.page_title() }}

{%endif%} + + {% block content %}{% endblock %} + + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} +
+ {% for category, message in messages %} + + {% endfor %} +
+ {% endif %} + {% endwith %} + + {% block body %}{% endblock body %} +
+ + + + + + + + + + + + {% block javascript %}{% endblock javascript %} + + diff --git a/dds_web/templates_brand/components/navbar.html b/dds_web/templates_brand/components/navbar.html new file mode 100644 index 000000000..c31afded2 --- /dev/null +++ b/dds_web/templates_brand/components/navbar.html @@ -0,0 +1,70 @@ + diff --git a/dds_web/templates_brand/home.html b/dds_web/templates_brand/home.html new file mode 100644 index 000000000..c2e69ab9f --- /dev/null +++ b/dds_web/templates_brand/home.html @@ -0,0 +1,45 @@ +{% extends 'base.html' %} +{% block body %} + +
+
+

This instance of the Data Delivery System (DDS) is a cloud-based system for the delivery of data from Epigenica to their users. It consists of a command line interface (CLI) and a web interface.

+
+
+
+ {% if g.current_user %} + + View projects + + + Log out + + {% else %} + {% include "components/login_form.html" %} + {% endif %} +
+
+
+
+ {% include "components/hero_image.svg" %} +
+
+ + + +

How it works

+

+ The DDS uses cloud computing object-storage provided by Safespring + to store the data ready for download. + The delivery system has built-in encryption and key management for highly secure yet user-friendly access to your + data. +

+ +{% endblock %} diff --git a/dds_web/templates_brand/mail/authenticate.html b/dds_web/templates_brand/mail/authenticate.html new file mode 100644 index 000000000..9251b9bb6 --- /dev/null +++ b/dds_web/templates_brand/mail/authenticate.html @@ -0,0 +1,25 @@ +{% extends 'mail/mail_base.html' %} +{% block body %} + + + + + + + +
+

+ Logo +

+
+

+ Here is your two-factor authentication code for the Epigenica Data Delivery System. +

+

+ Please, copy and paste the code below in order to log in: +

+

+ {{one_time_value}} +

+
+{% endblock %} diff --git a/dds_web/templates_brand/mail/authenticate.txt b/dds_web/templates_brand/mail/authenticate.txt new file mode 100644 index 000000000..b914366d5 --- /dev/null +++ b/dds_web/templates_brand/mail/authenticate.txt @@ -0,0 +1,4 @@ +Here is the issued authentication code for Epigenica Data Delivery System (DDS) +Please, copy and paste the code below where you attempt to authenticate: + +{{one_time_value}} diff --git a/dds_web/templates_brand/mail/deletion_request.html b/dds_web/templates_brand/mail/deletion_request.html new file mode 100644 index 000000000..8802f0fe5 --- /dev/null +++ b/dds_web/templates_brand/mail/deletion_request.html @@ -0,0 +1,73 @@ +{% extends 'mail/mail_base.html' %} +{% block body %} + + + + + + + +
+ Logo +
+

You + have requested the deletion of your user account {{sender_name}} from the Epigenica Data Delivery System (DDS). +

+

+ We appreciate you using our services and hope that the received data as well as the collaboration as a whole has + met your expectations. +

+ {% if projects is not none %} +

+ Currently, you are affiliated with these projects: +

    + {% for project in projects %} +
  • {{ project }}
  • + {% endfor %} +
+

+ {% endif %} +

+ Since your account in the Epigenica Data Delivery System (DDS) is not tied to specific + projects or platforms, you may also consider to keep it for prospective deliveries. +

+

+ Nonetheless, a reregistration is also possible at any time should you ever need to receive data from us again. + To confirm the deletion of your account {{sender_name}}, please 'Confirm delete' button to create your account: +

+ + + + + + + +

+ Alternatively, please copy and paste the link below into your browser:

+

+ {{link}}

+

+ If you would like to keep your account, you do not have to take any further action - the deletion request will + automatically expire after one week.

+
+{% endblock %} diff --git a/dds_web/templates_brand/mail/deletion_request.txt b/dds_web/templates_brand/mail/deletion_request.txt new file mode 100644 index 000000000..353043bbe --- /dev/null +++ b/dds_web/templates_brand/mail/deletion_request.txt @@ -0,0 +1,15 @@ +You have requested the deletion of your user account {{sender_name}} from the Epigenica Data Delivery System (DDS). + +We appreciate you using our services and hope that the received data as well as the collaboration as a whole has met your expectations. +{% if projects is not none %} +Currently, you are affiliated with these projects: +{% for project in projects %} + {{ project }} +{% endfor %} +{% endif %} + +Since your account in the Epigenica Data Delivery System (DDS) is not tied to specific projects or platforms, you may also consider to +keep it for prospective deliveries. + +Nonetheless, a reregistration is also possible at any time should you ever need to receive data from us again. To confirm the deletion of your account {{sender_name}}, please use the +following link: {{link}}. If you would like to keep your account, you do not have to take any further action - the deletion request will automatically expire after one week. diff --git a/dds_web/templates_brand/mail/invite.html b/dds_web/templates_brand/mail/invite.html new file mode 100644 index 000000000..3fc2ef00c --- /dev/null +++ b/dds_web/templates_brand/mail/invite.html @@ -0,0 +1,58 @@ +{% extends 'mail/mail_base.html' %} +{% block body %} + + + + + + + +
+ Logo +
+

You + have been invited to join the Epigenica Data Delivery System (DDS).

+

+ The DDS is a system for Epigenica to deliver data to researchers in a fast, secure and simple + way.

+

+ {% if unit_email %} + The invite was sent to you on behalf of {{displayed_sender}} ({{unit_email}}). + {% else %} + The invite was sent to you by {{displayed_sender}}. + {% endif %} + Please press the 'Sign Up' button to create your account: +

+ + + + + + + +

+ Alternatively, copy and paste the link below into your browser:

+

+ {{link}}

+

+ This link expires in 1 week.

+
+{% endblock %} diff --git a/dds_web/templates_brand/mail/invite.txt b/dds_web/templates_brand/mail/invite.txt new file mode 100644 index 000000000..f24457c6d --- /dev/null +++ b/dds_web/templates_brand/mail/invite.txt @@ -0,0 +1,9 @@ +You have been invited to join the Epigenica Data Delivery System (DDS). +The DDS is a system for Epigenica to deliver data to researchers in a fast, secure and simple way. + +{% if unit_email %} +The invite was sent to you on behalf of {{displayed_sender}} ({{unit_email}}). +{% else %} +The invite was sent to you by {{displayed_sender}}. +{% endif %} +Please copy paste the following link into your browser to create your account: {{link}} diff --git a/dds_web/templates_brand/mail/mail_base.html b/dds_web/templates_brand/mail/mail_base.html new file mode 100644 index 000000000..d219374bb --- /dev/null +++ b/dds_web/templates_brand/mail/mail_base.html @@ -0,0 +1,219 @@ + + + + + + + + Simple Transactional Email + + + + + + + + + + + + + + diff --git a/dds_web/templates_brand/mail/project_release.html b/dds_web/templates_brand/mail/project_release.html new file mode 100644 index 000000000..55f3bcf35 --- /dev/null +++ b/dds_web/templates_brand/mail/project_release.html @@ -0,0 +1,46 @@ +{% extends 'mail/mail_base.html' %} +{% block body %} + + + + + + + +
+ Logo +
+

+ The following project is now available for your access in the Epigenica Data Delivery System (DDS) and you can download your data. +

    +
  • Project Title: {{project_title}}
  • +
  • DDS project ID: {{project_id}}
  • +
+

+

+ You were added to this project {% if unit_email %} on behalf of {% else %} by {% endif %} {{displayed_sender}}. +

+

+ To list the files in this project, run:
+ dds ls -p {{project_id}}

+
+

+ To download all the files in this project to your current directory, run:
+ dds data get -p {{project_id}} -a --verify-checksum

+

+ For more information (including an installation guide), see the DDS CLI documentation here: DDS CLI documentation.

+

+ {% if unit_email %} + If you experience issues, please contact {{displayed_sender}} at {{unit_email}}. + {% else %} + If you experience issues, please contact {{displayed_sender}}. + {% endif %} +

+

+ Your access to this project will expire on:
{{deadline}}

+

+ What is the DDS? The DDS is a system for Epigenica to deliver data to researchers in a fast, secure and simple way.

+
+{% endblock %} diff --git a/dds_web/templates_brand/mail/project_release.txt b/dds_web/templates_brand/mail/project_release.txt new file mode 100644 index 000000000..68da900f4 --- /dev/null +++ b/dds_web/templates_brand/mail/project_release.txt @@ -0,0 +1,23 @@ +The following project is now available for your access in the Epigenica Data Delivery System (DDS) and you can now download your data. + - Project Title: {{project_title}} + - DDS project ID: {{project_id}} + +You were added to this project {% if unit_email %} on behalf of {% else %} by {% endif %} {{displayed_sender}}. + +To list the files in this project, run: + dds ls -p {{project_id}} + +To download all the files in this project to your current directory, run: + dds data get -p {{project_id}} -a --verify-checksum. + +For more information (including an installation guide), see the DDS CLI documentation here: https://epigenica.github.io/dds_cli/ + +{% if unit_email %} +If you experience issues, please contact {{displayed_sender}} at {{unit_email}}. +{% else %} +If you experience issues, please contact {{displayed_sender}}. +{% endif %} + +Your access to this project will expire on {{deadline}} + +What is the DDS? The DDS is a system for Epigenica to deliver data to researchers in a fast, secure and simple way. diff --git a/dds_web/templates_brand/privacy_policy.html b/dds_web/templates_brand/privacy_policy.html new file mode 100644 index 000000000..c1728dcaa --- /dev/null +++ b/dds_web/templates_brand/privacy_policy.html @@ -0,0 +1,109 @@ +{% extends "base.html" %} + +{% block body %} + +
+

Privacy Policy

+

Personal Data Protection in the Epigenica Data Delivery System

+

In compliance with the Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data, and repealing Directive 95/46/EC (General Data Protection Regulation, further in this text referred to as 'GDPR'), Epigenica informs the entities on terms and conditions under which personal data in the Data Delivery System are processed. Data subjects are natural persons using the Data Delivery System. 

+

+

+

+

Cookies

+

The Data Delivery System uses cookies. A cookie is a text file that a website asks to store on the visitor's computer. Cookies contain information that is needed for various functions on the website. Cookies can be created and stored by the website owner or created and stored by third parties. "Third party cookies" are created by external services, such as tools for collecting web statistics. They can be used to map your behaviour on several different websites. Most browsers offer the option of blocking this type of cookies.

+

The Data Delivery System uses session-based cookies: Strictly necessary cookies.

+
+ These cookies are essential for you to browse the website and use its features, such as accessing secure areas of the site. Cookies that allow web shops to hold your items in your cart while you are shopping online are an example of strictly necessary cookies. These cookies will generally be first-party session cookies. While it is not required to obtain consent for these cookies, what they do and why they are necessary should be explained to the user. +
+ +

Limiting the cookies

+

There are several ways of limiting the cookies that are accepted by your web browser. The settings vary from browser to browser, but in general, the options may be described as follows:

+

You can:

+ +

You can read more about cookies on the Swedish Post and Telecom Authority's website.

+ +

Changes to This Privacy Policy

+

+ We may update our Privacy Policy from time to time. + Thus, we advise you to review this page periodically for any changes. + We will notify you of any changes by posting the new Privacy Policy on this page. + These changes are effective immediately, after they are posted on this page. +

+ +

Contact Us

+

If you have any questions or suggestions about our Privacy Policy, do not hesitate to contact us.

+ + +
+ + + + + + + + + + + + +{% endblock %} diff --git a/dds_web/templates_brand/troubleshooting.html b/dds_web/templates_brand/troubleshooting.html new file mode 100644 index 000000000..3e5ab3d16 --- /dev/null +++ b/dds_web/templates_brand/troubleshooting.html @@ -0,0 +1,37 @@ +{% extends 'base.html' %} +{% block body %} +
+

Troubleshooting the DDS

+
+

Experiencing issues with the DDS?

+

Please read the troubleshooting document which provides answers to previously asked questions and possible solutions to issues that have been reported.

+

Download the PDF 

+
+

Did the troubleshooting document not help?

+

Please go through the following steps:

+
    +
  1. If the issue is related to the CLI, verify that you have the latest version installed: Open a terminal window, run dds --version and compare the displayed version to the latest one. The latest version can be found at GitHub Releases.
  2. +
  3. Look at the CLI documentation here.
  4. +
  5. Read through the sections in the technical overview relevant to your issue and check the topics below for possible solutions.
  6. +
+
+

Does the issue persist and/or the provided information not help?

+

If you're a data producer, using the DDS for data deliveries to your users: contact data.team@epigenica.se.

+

If you're a data recipient, using the DDS to download your data: contact the Epigenica unit responsible for delivering the data to you.

+

Please provide the following information:

+ +
+{% endblock %} diff --git a/dds_web/templates_brand/user/login.html b/dds_web/templates_brand/user/login.html new file mode 100644 index 000000000..9274836ae --- /dev/null +++ b/dds_web/templates_brand/user/login.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block page_title -%} +Log in to DDS +{%- endblock %} + +{% block body %} + +

Please use the form below to log in to the Epigenica Data Delivery System.

+
+
+ {% include "components/login_form.html" %} +
+
+

In order to get a DDS account you need an invitation from Epigenica. + Once you have received the invitation, you can register an account and log in to the system.

+
+
+{% endblock %} diff --git a/dds_web/templates_brand/user/register.html b/dds_web/templates_brand/user/register.html new file mode 100644 index 000000000..0337f6bd9 --- /dev/null +++ b/dds_web/templates_brand/user/register.html @@ -0,0 +1,114 @@ +{% extends "base.html" %} + +{% block page_title -%} +Create account +{%- endblock %} + +{% block body %} + +

Many thanks for your interest in using the Epigenica Data Delivery System.

+

Please use the form below to configure your account.

+ +
+ {{ form.csrf_token }} + + +
+ {{ form.name.label(class="col-md-2 col-form-label") }} +
+ {{ form.name(class="form-control mb-2"+(" is-invalid" if form.name.errors else "")) }} + {% if form.name.errors %} + {% for error in form.name.errors %} +
{{ error }}
+ {% endfor %} + {% endif %} +
+
+ + +
+ {{ form.email.label(class="col-md-2 col-form-label") }} +
+ {{ form.email(class="form-control mb-2"+(" is-invalid" if form.email.errors else "")) }} + {% if form.email.errors %} + {% for error in form.email.errors %} +
{{ error }}
+ {% endfor %} + {% endif %} +
+
+ + +
+ {{ form.username.label(class="col-md-2 col-form-label") }} +
+ {{ form.username(class="form-control mb-2"+(" is-invalid" if form.username.errors else "")) }} + {% if form.username.errors %} + {% for error in form.username.errors %} +
{{ error }}
+ {% endfor %} + {% endif %} +
+
+ + +
+ {{ form.password.label(class="col-md-2 col-form-label") }} +
+ {{ form.password(class="form-control mb-2"+(" is-invalid" if form.password.errors else "")) }} + {% if form.password.errors %} + {% for error in form.password.errors %} +
{{ error }}
+ {% endfor %} + {% endif %} +
+
+ + +
+ {{ form.confirm.label(class="col-md-2 col-form-label") }} +
+ {{ form.confirm(class="form-control mb-2"+(" is-invalid" if form.confirm.errors else "")) }} + {% if form.confirm.errors %} + {% for error in form.confirm.errors %} +
{{ error }}
+ {% endfor %} + {% endif %} +
+
+ + + + {% if unit %} +
+ +
+ {{ unit }} +
+
+ {% endif %} + + +
+

Open the Privacy Policy

+ {{ form.policy_checkbox.label(class="form-check-label")}} +
+ {{ form.policy_checkbox }} + {% if form.policy_checkbox.errors %} + {% for error in form.policy_checkbox.errors %} +
+ {{ error }} +
+ {% endfor %} + {% endif %} +
+
+ + + +
+ +{% endblock %} diff --git a/dds_web/templates_brand/user/userdeleted.html b/dds_web/templates_brand/user/userdeleted.html new file mode 100644 index 000000000..4fd6f28e8 --- /dev/null +++ b/dds_web/templates_brand/user/userdeleted.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block page_title -%} +Account deletion +{%- endblock %} + +{% block body %} + +{% if initial %} + +

Account deletion completed

+{% else %} +

Your account is already deleted!

+{% endif %} +

You have successfully deleted your account {{username}} at the Epigenica Data Delivery + System. Thank you for using our services. Feel free to sign up again, should you ever need to receive + data from us in the future!

+ +{% endblock %} diff --git a/dds_web/templates_brand/user/userexists.html b/dds_web/templates_brand/user/userexists.html new file mode 100644 index 000000000..5080eeea3 --- /dev/null +++ b/dds_web/templates_brand/user/userexists.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block page_title -%} +Registration complete +{%- endblock %} + +{% block body %} + +

You have successfully created your account at the Epigenica Data Delivery System.

+ +

To get started, please install the command line application.

+

Instructions how to access and manage your data can be found in the system's documentation.

+ +{% endblock %} diff --git a/dds_web/utils.py b/dds_web/utils.py index 130b26ee3..a27a7d118 100644 --- a/dds_web/utils.py +++ b/dds_web/utils.py @@ -377,15 +377,17 @@ def delrequest_exists(email): def send_reset_email(email_row, token): """Generate password reset email.""" msg = flask_mail.Message( - "WARNING! Password Reset Request for SciLifeLab Data Delivery System", + "WARNING! Password Reset Request for Epigenica Data Delivery System", recipients=[email_row.email], ) # Need to attach the image to be able to use it msg.attach( - "scilifelab_logo.png", + "epigenica_logo_light_bg.png", "image/png", - open(os.path.join(flask.current_app.static_folder, "img/scilifelab_logo.png"), "rb").read(), + open( + os.path.join(flask.current_app.static_folder, "img/epigenica_logo_light_bg.png"), "rb" + ).read(), "inline", headers=[ ["Content-ID", ""], @@ -408,9 +410,11 @@ def send_project_access_reset_email(email_row, email, token): # Need to attach the image to be able to use it msg.attach( - "scilifelab_logo.png", + "epigenica_logo_light_bg.png", "image/png", - open(os.path.join(flask.current_app.static_folder, "img/scilifelab_logo.png"), "rb").read(), + open( + os.path.join(flask.current_app.static_folder, "img/epigenica_logo_light_bg.png"), "rb" + ).read(), "inline", headers=[ ["Content-ID", ""], @@ -511,10 +515,12 @@ def send_motd_to_user_list(users_to_send, subject, body, html): subject=subject, recipients=[primary_email], body=body, html=html ) msg.attach( - "scilifelab_logo.png", + "epigenica_logo_light_bg.png", "image/png", open( - os.path.join(flask.current_app.static_folder, "img/scilifelab_logo.png"), + os.path.join( + flask.current_app.static_folder, "img/epigenica_logo_light_bg.png" + ), "rb", ).read(), "inline", @@ -535,9 +541,11 @@ def create_one_time_password_email(user, hotp_value): ) msg.attach( - "scilifelab_logo.png", + "epigenica_logo_light_bg.png", "image/png", - open(os.path.join(flask.current_app.static_folder, "img/scilifelab_logo.png"), "rb").read(), + open( + os.path.join(flask.current_app.static_folder, "img/epigenica_logo_light_bg.png"), "rb" + ).read(), "inline", headers=[ ["Content-ID", ""], diff --git a/docs/troubleshooting_epigenica.md b/docs/troubleshooting_epigenica.md new file mode 100644 index 000000000..625807adc --- /dev/null +++ b/docs/troubleshooting_epigenica.md @@ -0,0 +1,425 @@ +--- +title: "Data Delivery System" +subtitle: "Troubleshooting" +toc: true +geometry: "left=1cm, right=1cm, top=2cm, bottom=2cm" +fontsize: 12pt +colorlinks: true +header-includes: + # Next 2 lines set the font to Lato + - \usepackage{lato} + - \renewcommand{\familydefault}{\sfdefault} + # Next 3 lines set the header to include the date + - \usepackage{fancyhdr} + - \pagestyle{fancy} + - \rhead{30-Jul-2024} +--- + +# Users: Unit Admin/Personnel/Researchers + +## A. Invitation link invalid + +Did you receive the invitation email more than 7 days ago? + +- Yes: An invitation is only valid for 7 days. Contact the Epigenica unit that sent the original invitation and ask them to invite you again. +- No: Something else has gone wrong. Contact the Epigenica unit that sent the original invitation and ask them to: + 1. Remove the invitation with dds user delete --is-invite + 2. Invite you again + 3. Inform Epigenica support of the issue. + +## B. Too many authentication requests in one hour + +If this message is displayed in the web interface or CLI, the user has attempted to log in or logged in and out more +than 10 times within an hour. Please wait an hour and try again. + +## C. Web: Invalid username or password + +### 1. Are you sure you are using the correct username? + +- Yes: Move on to step 2 +- No: It's currently not possible to reset/change a password. There are three options depending on your DDS account role: + - Unit Admin or Unit Personnel: + - Ask a colleague to list the users within your unit (dds user ls) and check the table for the row with your name. + - Verify that the username matches the one you are using. + - Researcher: Contact the Epigenica unit that invited you to the DDS. + - Question for the Unit Admins / Personnel: Is the account connected to a project within the DDS? + - Yes: A Unit Admin or Unit Personnel role can list the researchers in a specific project: `dds ls --project --users`. They can then check the table for the user and find the correct username. + - No: The Unit Admin or Personnel should contact [data.team@epigenica.se](mailto:data.team@epigenica.se). + +### 2. Are you sure you are using the correct password? + +- Yes: Notify Epigenica support at [data.team@epigenica.se](mailto:data.team@epigenica.se). +- No: Try requesting a password reset in the web interface. + +- IMPORTANT: If you have access to any projects before the password reset, notify an Unit Admin or Unit Personnel + immediately that they need to run the following command: + `dds project access fix` + +The user running this command needs to have access to the projects in question. This can be seen in the "Access" column +when a user does dds ls to list the projects. + +## D. CLI: Failed to authenticate user: Missing or incorrect credentials + +Follow the same steps as in [C](#c.-web-invalid-username-or-password) above. + +## E. Not receiving emails + +KI seems to have a spam filter which makes receiving emails very slow in some cases. The email should show up at some +point, but it may take some time. + +If you have an email that you are certain does not go through the KI spam filter: + +- Verify that you are checking the correct email address +- Check the junk folder + +If you cannot find the email, contact Epigenica support at [data.team@epigenica.se](mailto:data.team@epigenica.se). + +## F. CLI Documentation not accessible + +You can access the CLI documentation online at [https://epigenica.github.io/dds_cli/](https://epigenica.github.io/dds_cli/). Notify Epigenica support that the documentation page is down so that we can look +into it. + +## G. Long error message (traceback) + +If you get a long error message after running the CLI: + +- Unit Personnel / Admins: Report this to [data.team@epigenica.se](mailto:data.team@epigenica.se). +- Researchers: Report this to the Epigenica unit delivering the data. + +Include the error message in the email. If the error is related to the DDS, an understandable message should always be +displayed and it's therefore important that we get information so that we can change it. + +## H. Token expires during delivery + +Unfortunately we cannot do anything about this at this time. Remember to authenticate yourself before every large +delivery. Re-authenticate yourself and then upload or download again. We will look into this issue if and when it arises. + +## I. Windows OS: Warning message "Storing the login information locally - please ensure no one else can access the file at …" + +Since the token file permissions check does not work on Windows OS, we are warning the users to be extra cautious in +keeping this file secure. The dds client should be fully functional despite this warning. + +## J. Permission denied (authentication token) when using the DDS on a func account or similar + +The default setting is that the authenticated token generated by `dds auth login` has permission 600. This means read +and write permissions for the specific unix user that is running the command. + +Running the dds auth login command with the option `--allow-group` will allow users from the same unix group to use the +resulting token file. However, keep the following in mind: + +- The permissions of tokens cannot be changed after the tokens are established. If you began an authenticated session + without the use of the `--allow-group` option, but want to use it in a new session, use `dds auth logout` to end the + current session. Then use the `--allow-group` option and start a new session. This also applies to the reverse. +- Not recommended for users with role Researcher, use with care. + +## K. QuotaExceeded + +The error could look something like this: + +``` +raise error_class(parsed_response, operation_name) + + botocore.exceptions.ClientError: An error occurred (QuotaExceeded) when calling the UploadPart operation: Unknown + +``` + +This indicates that the cloud storage location has a specific limit for your unit and that it has been exceeded. +Contact Epigenica support at [data.team@epigenica.se](mailto:data.team@epigenica.se), inform them of the error (remember to include the full error +message) and tell them the size of the data you are attempting to upload. + +## L. Unrecoverable key error + +The most likely reason for a key related error is that you do not have access to the project you are trying to access. +If you get an error message containing something similar to "Unrecoverable key error", please go through the following +steps: + +### 1. Run `dds ls` + +- Find the row of the project you were trying to access or use +- Check the "Access" column for that row - does it contain a red cross or a green check mark? + - Green check: You have access to the project. This is not the issue. + - Does the current project status allow for the action you are trying to perform? Please look at the technical + overview and documentation. These are linked at the start of this document. + - Yes: Go to step 2. + - No: This is most likely the issue. Make sure the project status allows for the current action. + Please report the error message, what you were trying to do, the exact command, what steps you have performed + and any other information you may have, and we will look into this. + - Red cross: You do not have access to the project. Important note: If no one else has access to the project, + please note that Epigenica support cannot help you. As Super Admins in the DDS, we do not have access to any of your + data and we cannot restore your access. Please read the technical overview, the link is displayed at + dds.epigenica.se and also when running the CLI commands. + - Researcher: You need to contact all Epigenica units responsible for the projects you are involved in in the DDS. + They need to run `dds project access fix` for you. Try again after that is done. + - Unit Admin / Personnel: You need to contact a colleague with access to the projects you are trying to use. + They need to run `dds project access fix` for you. Try again after that is done. + +### 2. If you have checked the project status, the project access, the access is fixed, or you have not been able to identify the issue, please contact Epigenica support and include the full error message, the exact command you are running. + +## M. ERROR: Internal Server Error + +Contact [data.team@epigenica.se](mailto:data.team@epigenica.se) and provide the information listed [here](https://dds.epigenica.se/trouble). + +## N. TooManyBuckets + +Safespring has a maximum number of buckets per unit, however this number is set quite high and therefore this should +not happen. If it does happen, contact Epigenica support and we will fix this. You can also check the active projects +and see if there is one that is an active project that can be archived, for example. Be careful with this and +do not delete/archive (including abort) projects which you are not 100% sure that they are ready to be deleted/archived. +This is not reversible. + +## O. Errors occurred during upload + +When running `dds data put`, if there are issues, the following is a possible output: + +``` +Errors occurred during upload. + +If you wish to retry the upload, re-run the `dds data put` command again, specifying the same options as you did now. To also overwrite the files that were uploaded, also add the `--overwrite` flag at the end of the command. + +See /code/DataDelivery_2022-06-30_14-17-18/logs/dds_failed_delivery.json for more information. +``` + +Inform Epigenica support of the issue. + +## P. Not possible to change project status (Deadlock) + +A while back, someone commented that they were having issues with changing the status of a project. It turned out that +the status had actually been changed, so before contacting Epigenica support, check the project status and see if it has +changed despite the error. + +## Q. Lost access to 2FA Authenticator App + +If you have configured the Two Factor Authentication of your DDS account to use an authenticator app, but you have +lost access to it (e.g. due to a broken or lost device), Epigenica support can deactivate the configuration in order to +let you authenticate using the default email option. After this you can choose to activate the authenticator app method +again. + +Please contact Epigenica support at [data.team@epigenica.se](mailto:data.team@epigenica.se) and ask for a reset of the 2FA method; complement the request with the username +and email address of the affected account. + +## R. Windows: DDS freezes after message + +The output from the DDS could look something like this: + +``` +PS Z:\> dds auth login +dds : ( +At line:1 char:1 ++ dds auth login ++ ~~~~~~~~~~~~~~ ++ CategoryInfo : NotSpecified: ( ( :String) [], RemoteException ++ FullyQualifiedErrorId : NativeCommandError +( ( ) ( +( ) ) ( ( ) Epigenica Data Delivery System +) ( ) ) ( https://dds.epigenica.se/ +) ( ) Version 2.1.1 +) + +INFO Attempting to create the session token +``` + +Unfortunately this seems to have something to do with the Windows command prompt and the encoding (or logging), and not +the DDS. We have attempted to reproduce the issue in both the Command Prompt and Powershell without success. To attempt +to solve this, look at the following steps: + +### How did you install the CLI? + +- I downloaded the executable as instructed [here](https://epigenica.github.io/dds_cli/installation_epigenica/#install-via-the-executable). + - Inform Epigenica support. + +Depending on your level of experience with Stack Overflow and the command line, [this comment](https://stackoverflow.com/a/20950421) +could potentially help you to solve the issue. + +## S. The download is interrupted + +### 1. Are you attempting to download the data within Sweden? + +- Yes, I'm in Sweden: Move on to 2. +- No, I'm not in Sweden: The DDS uploads data to a cloud service located within the Swedish borders. Downloading data + overseas is most likely slower, however it should work. Verify that your internet connection is stable. Note that + downloading data via a hotel WiFi connection a) is not recommended, and b) will most likely not be permitted due to hotel + WiFi limits. + +### 2. Have you checked that you have enough storage space available in the location you're attempting to download the data? + +- Yes, I have enough space: Move on to 3. +- No: Please make sure you have enough storage space available. + +### 3. Contact the Epigenica unit delivering your data. + +## T. "No data specified" + +This message is displayed when you have not specified what data to download. In order to download data from your project, +you need to use one of the following options: + +`--source`/`–s`: Downloads a specific file or directory. You can use this option multiple times to specify separate +files or directories. + +`--get-all`/`–a`: Downloads the entire content of the project. + +# Epigenica Support + +## A. Invitation link invalid + +Ask them to follow the instructions in the Invitation link invalid section in the User part of this document. +Unit Admins/Personnel can also run the following commands: + +- Delete the invite if it exists: `dds user delete --is-invite`. If they are experiencing issues with this, we as + Super Admins can also do this. +- Invite them again. Super Admins should not be doing this. + +## B. Too many authentication requests in one hour + +If this message is displayed in the web interface or CLI, the user has attempted to log in or logged in and out more +than 10 times within an hour. Ask the user to wait for an hour and try again later. + +## C. Web: Invalid username or password + +If a user cannot log in to the web interface, ask them to follow the steps in [C above](#c.-web-invalid-username-or-password). +If they have already done this, check that they have provided all the information listed [here](https://dds.epigenica.se/trouble). + +A possibility is that the web is not letting them in because they have attempted to log in more than 10 times in an hour. +If that's the case, tell them to try again later. If it's not the case, there's not much you can do. Offer to delete their +account and invite them again. It's better if a Unit Admin or Personnel handles the new invite, but if you do, remember +that you cannot invite Researchers to specific projects, only to the DDS in general and that you need to specify the unit +public ID if you want to invite a Unit Personnel or Admin. However, if there are active projects in the unit, they will +still not have access, so they still need to ask someone within their unit with access to the projects, for renewal of +the project access. + +## D. CLI: Failed to authenticate user: Missing or incorrect credentials + +Follow the same steps as in [the above C](#c.-web-invalid-username-or-password-1) above. + +## E. Not receiving emails + +Check the information in the User section earlier in the document regarding this specific topic. If they contact us, +the email is correct and it's not an email address connected to the KI spam filter, create a card in the issue tracker. + +## F. CLI Documentation not accessible + +1. Notify the users that they can access the CLI documentation at [https://epigenica.github.io/dds_cli/](https://epigenica.github.io/dds_cli/) +2. Investigate the issue, including whether it could be infrastructure-related. + +## G. Long error message (traceback) + +1. Make sure they have upgraded the CLI to the latest version. If they have, or the upgrade does not help, move on to 2. +2. Make sure they have provided the information listed [here](https://dds.epigenica.se/trouble). +3. Look through the traceback. There could be some uncaught error or similar in the CLI, most often this is not caused + by the backend, and most likely this is not something that can wait. If that's the case, create a card in the issue tracker. + +## H. Token expires during delivery + +We cannot do anything about this. It's on the todo list. + +## I. Windows OS: Warning message "Storing the login information locally - please ensure no one else can access the file at …" + +Since the token file permissions check does not work on Windows OS, we are warning the users to be extra cautious in +keeping this file secure. The dds client should be fully functional despite this warning. + +## J. Permission denied (authentication token) when using the DDS on a func account or similar + +### Basic information + +- The default setting is that the authenticated token generated by `dds auth login` has permission 600. This means read + and write permissions for the specific unix user that is running the command. +- Running the `dds auth login` command with the option `--allow-group` will allow users from the same unix group to use + the resulting token file. +- The permissions of tokens cannot be changed after the tokens are established. If you began an authenticated session + without the use of the `--allow-group option`, but want to use it in a new session, use `dds auth logout` to end the + current session. Then use the `--allow-group option` and start a new session. This also applies to the reverse. +- Not recommended for users with role Researcher, use with care. +- As long as the `dds auth login` command works without the additional permissions option, that is what the users will +- have to work with for now. + +### Background / additional information: + +The default setting is that the authenticated token generated by `dds auth login` has permission 600. Because of issues +with func accounts, the option `--allow-group` was added as a flag to `dds auth login` so that a func account can use +the authenticated token for deliveries with the DDS. The permissions are set to 640: `-rw-r-----` (read and write +permissions for the user running the command, and only read permission for a group). + +## K. QuotaExceeded + +The error could end with something like this: + +``` +raise error_class(parsed_response, operation_name) + + botocore.exceptions.ClientError: An error occurred (QuotaExceeded) when calling the UploadPart operation: Unknown +``` + +- Check with the user which unit they have an account within and the size of the data they are attempting to upload. +- Contact Safespring and ask them to increase the quota for the specific project. +- When the quota has been changed, inform the users that they can try the upload again. + +## L. Unrecoverable key error + +The most likely reason for a key related error is that the user does not have access to the project they are trying to +access, and that there is an uncaught error somewhere. + +1. Ask the user to perform the steps in the corresponding user section. If they have done this, check if the user is + active or not first: `dds user ls`. +2. Ask them to run the commands as specified in the Unrecoverable key error section earlier in the document and for them + to send you the output of those commands. +3. Ask them to create a new project and to do the same command with that one. If it works, the issue is with that specific + project and this should be reported as a bug. + +## M. ERROR: Internal Server Error + +The most likely reason for an Internal Server Error is an uncaught exception in the backend, often something database +related. If someone contacts you regarding an Internal Server Error, begin with making sure they have provided the +information mentioned [here](https://dds.epigenica.se/trouble). When they have done this, look through the traceback. + +## N. TooManyBuckets + +Safespring has a maximum number of buckets per unit, however this number is set quite high and therefore this should +not happen. If it does happen, contact Safespring and ask them to increase the number of allowed buckets in the affected +Safespring project. After this, the users can attempt creating a project again. + +## O. Errors occurred during upload + +The message from the CLI could be something like this: + +``` +Errors occurred during upload. +If you wish to retry the upload, re-run the `dds data put` command again, specifying the same options as you did now. To also overwrite the files that were uploaded, also add the `--overwrite` flag at the end of the command. + + +See /code/DataDelivery_2022-06-30_14-17-18/logs/dds_failed_delivery.json for more information. +``` + +If a user contacts us with an upload issue that has generated the aforementioned file, do the following: + +1. Ask them to send the exact CLI command that they ran +2. Get the JSON file. +3. Download that file and run the following command in the cluster, in the DDS backend: + `flask update-uploaded-file` while specifying the project and the path to the file as options. + +## P. Not possible to change project status (Deadlock) + +Ask the user to check the project status if they haven't already, it may be the status they were trying to change to. +Otherwise, ask them to wait for a bit and then try again. + +## Q. Lost access to 2FA Authenticator App + +Another Super Admin can deactivate the configuration in order to let the user authenticate using the default email +option. Super Admins can also do this for other account roles. + +Run the following command: + +`dds auth twofactor deactivate` + +## R. Windows: DDS freezes after message + +Ask them to follow the corresponding User section of this document. If they have done that already and it does not help, +there's nothing we can do. + +## S. The download is interrupted + +All cases reported so far have not been connected to the DDS specifically. It's most likely due to a network issue or +lack of storage space as described in the corresponding section in the User section. + +## T. "No data specified" + +The user has not specified what they wish to download. Make sure that the user has specified either `--source`/`–s` +or `--get-all`/`–a` as described in the user section.