Skip to content

Commit

Permalink
[#171550422] Add ENV var for CIE metadata download (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnedMarshal authored Mar 4, 2020
1 parent 775afce commit d00f303
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ jobs:
PAGOPA_API_URL: "https://pagopa-proxy"
PAGOPA_API_URL_TEST: "https://pagopa-proxy-test"
PAGOPA_BASE_PATH: "/pagopa/api/v1"
CIE_METADATA_URL: https://idserver.servizicie.interno.gov.it:8443/idp/shibboleth
IDP_METADATA_URL: "https://raw.githubusercontent.com/teamdigitale/io-backend/164984224-download-idp-metadata/test_idps/spid-entities-idps.xml"
REDIS_URL: redis://localhost
- run: 'bash <(curl -s https://codecov.io/bash)'
Expand Down
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ PAGOPA_API_URL="https://pagopa-proxy"
PAGOPA_API_URL_TEST="https://pagopa-proxy-test"
SPID_AUTOLOGIN=lussoluca
SPID_TESTENV_URL=https://spid-testenv2:8088
CIE_METADATA_URL=https://idserver.servizicie.interno.gov.it:8443/idp/shibboleth
IDP_METADATA_URL=https://registry.spid.gov.it/metadata/idp/spid-entities-idps.xml
SHUTDOWN_SIGNALS="SIGINT SIGTERM"
SHUTDOWN_TIMEOUT_MILLIS=30000
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Those are all Environment variables needed by the application:
| PAGOPA_API_URL_TEST | The url for the PagoPA api endpoints in test mode | string |
| PAGOPA_BASE_PATH | The root path for the PagoPA endpoints | string |
| SPID_AUTOLOGIN | The user used in the autologin feature, omit this to disable autologin | string |
| CIE_METADATA_URL | Url to download CIE metadata from | string |
| IDP_METADATA_URL | Url to download IDP metadata from | string |
| IDP_METADATA_REFRESH_INTERVAL_SECONDS | The number of seconds when the IDPs Metadata are refreshed | int |
| CACHE_MAX_AGE_SECONDS | The value in seconds for duration of in-memory api cache | int |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"homepage": "https://github.com/pagopa/io-backend#readme",
"dependencies": {
"@pagopa/io-spid-commons": "^2.5.0",
"@pagopa/io-spid-commons": "^2.6.0",
"apicache": "^1.4.0",
"applicationinsights": "^1.4.2",
"azure-sb": "^0.10.6",
Expand Down
2 changes: 2 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const SPID_TESTENV_URL =

// Register the spidStrategy.
export const IDP_METADATA_URL = getRequiredENVVar("IDP_METADATA_URL");
const CIE_METADATA_URL = getRequiredENVVar("CIE_METADATA_URL");

export const CLIENT_ERROR_REDIRECTION_URL =
process.env.CLIENT_ERROR_REDIRECTION_URL || "/error.html";
Expand Down Expand Up @@ -142,6 +143,7 @@ export const serviceProviderConfig: IServiceProviderConfig = {
],
name: "Required attributes"
},
spidCieUrl: CIE_METADATA_URL,
spidTestEnvUrl: SPID_TESTENV_URL,
spidValidatorUrl: process.env.SPID_VALIDATOR_URL,
strictResponseValidation: {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@
dependencies:
"@types/node" ">= 8"

"@pagopa/io-spid-commons@^2.5.0":
version "2.5.0"
resolved "https://npm.pkg.github.com/download/@pagopa/io-spid-commons/2.5.0/96a31352060eb5882f0a52e45b157eb13dc2001303beed13dbcddbf10fa57b8a#8805bdd8ce218c66e56ae8ba222d06d65bc0eb66"
integrity sha512-hYItaXs9hSTYLugW3yOR02HVSjFYnKVJj5VsONTgTr7rY+yd6GQ197HPw9MIuUqqNvWQ8Y970hF2Bfcu+xisig==
"@pagopa/io-spid-commons@^2.6.0":
version "2.6.0"
resolved "https://npm.pkg.github.com/download/@pagopa/io-spid-commons/2.6.0/f454e6b0cd8a10f331ae88dc8123e0ea59c8a05233729194a3f1bfe460d12faa#05dc7697c8e3891f7a4dbe0a00ab760471c2c232"
integrity sha512-Acv8dpHETbWs/v8bOKKlO3AO58uvx/ad99uUfk6CKUheSi4mKapU2kuOw1/JiWjjSJa6jU5kgxnqfaoYRoePDg==
dependencies:
"@types/redis" "^2.8.14"
date-fns "^1.30.1"
Expand Down

0 comments on commit d00f303

Please sign in to comment.