{"id":23122773,"url":"https://github.com/folio-org/edge-patron","last_synced_at":"2025-03-23T21:14:03.966Z","repository":{"id":32578975,"uuid":"136335560","full_name":"folio-org/edge-patron","owner":"folio-org","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-18T10:18:37.000Z","size":408,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-05-18T11:26:29.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/folio-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-06T13:50:55.000Z","updated_at":"2024-05-18T11:26:32.392Z","dependencies_parsed_at":"2024-03-21T14:58:02.365Z","dependency_job_id":"d0da543e-0102-4992-b1a0-19ae69fd7d7c","html_url":"https://github.com/folio-org/edge-patron","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folio-org%2Fedge-patron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folio-org%2Fedge-patron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folio-org%2Fedge-patron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folio-org%2Fedge-patron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/folio-org","download_url":"https://codeload.github.com/folio-org/edge-patron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245168912,"owners_count":20571804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T07:30:22.356Z","updated_at":"2025-03-23T21:14:03.922Z","avatar_url":"https://github.com/folio-org.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edge-patron\n\nCopyright (C) 2018-2023 The Open Library Foundation\n\nThis software is distributed under the terms of the Apache License,\nVersion 2.0. See the file \"[LICENSE](LICENSE)\" for more information.\n\n## Introduction\n\nEdge API to interface with FOLIO for 3rd party discovery services to allow patrons to perform self-service actions (place holds, renewals, etc)\n\n## Overview\n\nThe purpose of this edge API is to bridge the gap between 3rd party discovery services and FOLIO.  More specifically, the initial implementation was built with EBSCO's Discovery Service (EDS) in mind and the patron empowerment portion of the RTAC service.  Paton empowerment allows patrons to perform self-service actions such as manage their holds, renewals, etc.\n\n## Security\n\nThe edge-patron API is secured via the facilities provided by edge-common.  More specifically, via API Key.  See edge-common for additional details.\n\n## Required Permissions\n\nInstitutional users should be granted the following permissions in order to use this edge API:\n- `patron.all`\n- `users.collection.get`\n- `circulation.requests.item.get`\n\n## Configuration\n\nConfiguration information is specified in two forms:\n1. System Properties - General configuration\n2. Properties File - Configuration specific to the desired secure store\n\n### System Properties\n\n| Property                         | Default             | Description                                                                |\n|----------------------------------|---------------------|----------------------------------------------------------------------------|\n| `port`                           | `8081`              | Server port to listen on                                                   |\n| `okapi_url`                      | *required*          | Where to find Okapi (URL)                                                  |\n| `secure_store`                   | `Ephemeral`         | Type of secure store to use.  Valid: `Ephemeral`, `AwsSsm`, `Vault`        |\n| `secure_store_props`             | `NA`                | Path to a properties file specifying secure store configuration            |\n| `token_cache_ttl_ms`             | `3600000`           | How long to cache JWTs, in milliseconds (ms)                               |\n| `null_token_cache_ttl_ms`        | `30000`             | How long to cache login failures (null JWTs), in milliseconds (ms)         |\n| `token_cache_capacity`           | `100`               | Max token cache size                                                       |\n| `patron_id_cache_ttl_ms`         | `3600000`           | How long to cache patron ID mappings in milliseconds (ms)                  |\n| `null_patron_id_cache_ttl_ms`    | `30000`             | How long to cache patron lookup failures in milliseconds (ms)              |\n| `patron_id_cache_capacity`       | `1000`              | Max token cache size                                                       |\n| `keycloak_key_cache_ttl_ms`      | `3600000`           | How long to cache patron ID mappings in milliseconds (ms)                  |\n| `null_keycloak_key_cache_ttl_ms` | `30000`             | How long to cache patron lookup failures in milliseconds (ms)              |\n| `keycloak_key_cache_capacity`    | `1000`              | Max token cache size                                                       |\n| `log_level`                      | `INFO`              | Log4j Log Level                                                            |\n| `request_timeout_ms`             | `30000`             | Request Timeout                                                            |\n\n### Env variables for secure requests\n| Property | Default        | Description                              |\n|----------|----------------|------------------------------------------|\n| `KC_URL` | ``             | Keycloak url for secure token validation |\n\n### Env variables for TLS configuration for Http server\n\nTo configure Transport Layer Security (TLS) for the HTTP server in an edge module, the following configuration parameters should be used.\nParameters marked as Required are required only in case when TLS for the server should be enabled.\n\n| Property                                            | Default          | Description                                                                                 |\n|-----------------------------------------------------|------------------|---------------------------------------------------------------------------------------------|\n| `SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEYSTORE_TYPE`     | `NA`             | (Required). Set the type of the keystore. Common types include `JKS`, `PKCS12`, and `BCFKS` |\n| `SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEYSTORE_LOCATION` | `NA`             | (Required). Set the location of the keystore file in the local file system                  |\n| `SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEYSTORE_PASSWORD` | `NA`             | (Required). Set the password for the keystore                                               |\n| `SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEY_ALIAS`         | `NA`             | Set the alias of the key within the keystore.                                               |\n| `SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEY_PASSWORD`      | `NA`             | Optional param that points to a password of `KEY_ALIAS` if it protected                     |\n\n### Env variables for TLS configuration for Web Client\n\nTo configure Transport Layer Security (TLS) for Web clients in the edge module, you can use the following configuration parameters.\nTruststore parameters for configuring Web clients are optional even when `FOLIO_CLIENT_TLS_ENABLED = true`.\nIf truststore parameters need to be populated, `FOLIO_CLIENT_TLS_TRUSTSTORETYPE`, `FOLIO_CLIENT_TLS_TRUSTSTOREPATH` and `FOLIO_CLIENT_TLS_TRUSTSTOREPASSWORD` are required.\n\n| Property                                | Default           | Description                                                                      |\n|-----------------------------------------|-------------------|----------------------------------------------------------------------------------|\n| `FOLIO_CLIENT_TLS_ENABLED`              | `false`           | Set whether SSL/TLS is enabled for Vertx Http Server                             |\n| `FOLIO_CLIENT_TLS_TRUSTSTORETYPE`       | `NA`              | Set the type of the keystore. Common types include `JKS`, `PKCS12`, and `BCFKS`  |\n| `FOLIO_CLIENT_TLS_TRUSTSTOREPATH`       | `NA`              | Set the location of the keystore file in the local file system                   |\n| `FOLIO_CLIENT_TLS_TRUSTSTOREPASSWORD`   | `NA`              | Set the password for the keystore                                                |\n\n\n## Patron Mapping\n\nIn order to map external patron IDs to those used within FOLIO, the `externalSystemId` field in the user metadata is used.  The mapping flow works like this:\n\n1. A request arrives containing an external system's patron ID\n2. The patron ID cache is consulted.  If a mapping has been cached, skip to #5.\n3. A request is made to mod-users, querying for the user having the provided `externalSystemId`\n4. The external ID -\u003e internal/FOLIO ID mapping is cached for a configurable amount of time.\n5. The internal/FOLIO ID is used when calling mod-patron\n\n## Additional information\n\n### Issue tracker\n\nSee project [EDGPATRON](https://issues.folio.org/browse/EDGPATRON)\nat the [FOLIO issue tracker](https://dev.folio.org/guidelines/issue-tracker).\n\n### Other documentation\n\nOther [modules](https://dev.folio.org/source-code/#server-side) are described,\nwith further FOLIO Developer documentation at [dev.folio.org](https://dev.folio.org/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolio-org%2Fedge-patron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolio-org%2Fedge-patron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolio-org%2Fedge-patron/lists"}