Repository navigation
Configuration env
This document covers the general .env settings and how they should be configured. For reference a sample file ahs been provided as part of this repo.
##-----------------------------
# FOLIO Connection Environment Variables
## FOLIO Base URLs
TEST_BASE_URL = "https://okapi-library.institution.edu"
## FOLIO User Name
TEST_USER_NAME = "app_transfer"
TEST_USER_PASS = "a8F#kL9zX2qW@rT5vYp3mN6oJ"
## FOLIO tenant ID (same across all envs)
TEST_FOLIO_TENANT = "a1b2c3d4e5"
##-----------------------------
# Save locations
# File Delivery type
# AWS - Uploaded to a AWS bucket
# FTP - uploaded to a FTP site
# LOCAL - Save toa local directly
## AWS Settings
AWS_1_ACCESS_KEY_ID = AKIAIOSFODNN7RANDOM1234
AWS_1_SECRET_ACCESS_KEY = R4nd0mStr1ngG3n3r4t3dH3r3W1thM0r3Ch4r4ct3rsF0rS3cur1ty
AWS_1_REGION = us-east-
AWS_1_BUCKET = bucket-name
## SFTP Settings
FTP_2_USER = "foo"
FTP_2_PASSWORD = "pass"
FTP_2_HOST = "192.168.1.55"
FTP_2_PORT = 22
FTP_2_REMOTE_PATH = "/"
FTP_2_CERTIFICATE_LOCATION = "LOCAL"
FTP_2_CERTIFICATE_PATH = "temp/ssh_host_rsa_key"
FTP_2_KEY_TYPE = "RSA"
FTP_2_KNOW_HOSTS_LOCATION = "AWS_1"
FTP_2_KNOW_HOSTS_PATH = "know_hosts"
## Microsoft Azure Settings
MICROSOFT_1_AUTH_LOCATION = "LOCAL"
MICROSOFT_1_AUTH_PATH = "secrets/azure_auth.json"
## SMTP Settings
SMTP_1_DEFAULT_FROM = MyAccount@institution.com
SMTP_1_DEFAULT_REPLY_TO = MyAccount@institution.com
SMTP_1_HOST = smtp.institution.com
SMTP_1_PORT = 587
SMTP_1_USERNAME = MyAccount
SMTP_1_PASSWORD = "G7x!pQ2@rT5vL9zX2qW#kN6oJmYp3mN"
SMTP_1_TLS = true
## Local File System
LOCAL_1_FILE_PATH = "/tmp/exports"The user name used to authenticate against the FOLIO system for the environment specified in the RUN_ENV variable.
The password used to authenticate against the FOLIO system for the environment specified in the RUN_ENV variable.
The tenant that you are connecting to in the FOLIO system. This value can be found in the FOLIO system under the Settings -> Software Version in the same section as the API url.
The base URL for the FOLIO system for the environment specified in the RUN_ENV variable.
- OKAPI - These urls usually begin with okapi.YOUR_DOMAIN.com
- Your API url can be found in the FOLIO system under the
Settings->Software Versionunder theOkapi servicesection.
- Your API url can be found in the FOLIO system under the
- Eureka - These urls usually begin with kong.YOUR_DOMAIN.com
- Your API url can be found in the FOLIO system under the
Settings->Software Versionunder theAPI gateway servicessection.
- Your API url can be found in the FOLIO system under the
Connection stings are used by the Export functions to send data to other locations. There are several types of connection settings that can be used, and they are outlined below. These are the general settings for each connection type. documentation on how they are used can be found in the Exporting documentation.
- (options)
trueorfalse-
truewill use the secure connection to the S3 bucket. -
falsewill not use the secure connection to the S3 bucket.
-
If this is set to true then _ACCESS_KEY_ID and _SECRET_ACCESS_KEY will be used to authenticate against the S3 bucket.
The access key ID used to authenticate against the AWS system for the environment specified in the RUN_ENV variable.
The secret access key used to authenticate against the AWS system for the environment specified in the RUN_ENV variable.
The region that you are connecting to in the AWS system. This value can be found in the AWS system under the Settings -> Software Version in the same section as the API url.
The bucket that you are connecting to in the AWS system. This value can be found in the AWS system under the Settings -> Software Version in the same section as the API url.
The user name used to authenticate against the SFTP system for the environment specified in the RUN_ENV variable.
- (options)
CERTIFICATEor a 'PASSWORD'-
CERTIFICATEwill use the certificate to authenticate against the SFTP system. - The password that will be used to authenticate against the SFTP system.
-
The host that you are connecting to in the SFTP system. This can be an ip address or a domain name.
- The port that you are connecting to in the SFTP system. This is usually
22for SFTP systems.
- The remote path that you are connecting to in the SFTP system. This is usually
/for the base directory.
optional
- (options)
LOCALor <<RUN_ENV>>-
LOCALwill use the local file system to find the certificate. - <<RUN_ENV>> will use the connection string for that environment to find the certificate. Fro example 'AWS_1' will use the AWS_1 connection string to connect to that S3 bucket.
-
- The path to the certificate that will be used to authenticate against the SFTP system.
- For
LOCALthis will be a relative or absolute directory and file name sting. - For <<RUN_ENV>> esp in the case of AWS S3 bucket this would be the file name.
- For
- (options)
RSAorED25519-
RSAwill use the RSA key type to authenticate against the SFTP system. -
ED25519will use the ED25519 key type to authenticate against the SFTP system.
-
optional
- (options)
false,LOCAL, <<RUN_ENV>>-
falsewill not use a know hosts file to authenticate against the SFTP system. -
LOCALwill use the local file system to find the know hosts file. - <<RUN_ENV>> will use the connection string for that environment to find the certificate. Fro example 'AWS_1' will use the AWS_1 connection string to connect to that S3 bucket.
-
- The path to the know_hosts file that will be used for SFTP system.
- For
LOCALthis will be a relative or absolute directory and file name sting. - For <<RUN_ENV>> esp in the case of AWS S3 bucket this would be the file name.
- For
This connection can allow access to multiple Microsoft 360 services. This currently includes support for:
- OneDrive
- Sharepoint (feature not yet implemented)
- Teams (feature not yet implemented)
- Must be set to
MICROSOFT. This will tell the export system which email processor to use.
- (options)
LOCALor <<RUN_ENV>>-
LOCALwill use the local file system to find the certificate. -
S3will use a S3 bucket to find the certificate.- The
_SECUREflag on the AWS environment variable will determine if the connection is secure or not.-
falseis used when this code is being ran as a lambda and does have direct access to the S3 bucket. -
trueis used when this code is not being ran as a lambda and does not have direct access to the S3 bucket.
-
- The
- <<RUN_ENV>> will use the connection string for that environment to find the certificate. Fro example 'AWS_1' will use the AWS_1 connection string to connect to that S3 bucket.
-
- The path to the JSON Token that will be used to authenticate against the system.
- For
LOCALthis will be a relative or absolute directory and file name sting. - For <<RUN_ENV>> esp in the case of AWS S3 bucket this would be the file name.
- For
- Your
Application (client) ID. Found on the 'Overview' page.
- Your client
Value. Found on the 'Certificates & secrets' page for your app certificate.
Feature not yet implemented See: Microsoft 360 for more information on how to set up the connection.
- Must be set to
SMTP. This will tell the export system which email processor to use.
- The host that you are connecting to in the SMTP system. This can be an ip address or a domain name.
- The port that you are connecting to in the SMTP system. This is usually
25for SMTP systems.
- The user name used to authenticate against the SMTP system for the environment specified in the
RUN_ENVvariable.
- The password used to authenticate against the SMTP system for the environment specified in the
RUN_ENVvariable.
- The email address that will be used to send the email from. This is usually the same as the user name.
- (options)
trueorfalse-
truewill use TLS to authenticate against the SMTP system. -
falsewill not use TLS to authenticate against the SMTP system.
-
- The path to the local file system that will be used to save the files.
- This can be a relative or absolute path.
Feature not yet implemented
Feature not yet implemented See: Microsoft 360 for more information on how to set up the connection.
Feature not yet implemented
Feature not yet implemented See: Microsoft 360 for more information on how to set up the connection.