-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodules.html
38 lines (38 loc) · 37.9 KB
/
modules.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-docs/modules">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.4.1">
<title data-rh="true">Modules | Gropius</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://ccims.github.io/gropius-docs/modules"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Modules | Gropius"><meta data-rh="true" name="description" content="api-public"><meta data-rh="true" property="og:description" content="api-public"><link data-rh="true" rel="icon" href="/gropius-docs/img/logo.svg"><link data-rh="true" rel="canonical" href="https://ccims.github.io/gropius-docs/modules"><link data-rh="true" rel="alternate" href="https://ccims.github.io/gropius-docs/modules" hreflang="en"><link data-rh="true" rel="alternate" href="https://ccims.github.io/gropius-docs/modules" hreflang="x-default"><link rel="stylesheet" href="/gropius-docs/assets/css/styles.4fb28803.css">
<link rel="preload" href="/gropius-docs/assets/js/runtime~main.836956a5.js" as="script">
<link rel="preload" href="/gropius-docs/assets/js/main.309bbcf4.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}return t}()||function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"dark")}()</script><div id="__docusaurus">
<div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/gropius-docs/"><div class="navbar__logo"><img src="/gropius-docs/img/logo.svg" alt="" class="themedImage_ToTc themedImage--light_HNdA"><img src="/gropius-docs/img/logo.svg" alt="" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">Gropius Backend</b></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/gropius-docs/">Docs</a><a class="navbar__item navbar__link" href="/gropius-docs/api/core">API</a><a class="navbar__item navbar__link" href="/gropius-docs/graphql/api-public">GraphQL</a><a class="navbar__item navbar__link" href="/gropius-docs/rest/login-service/gropius-login-service">REST</a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/ccims/gropius-backend" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently dark mode)" aria-label="Switch between dark and light mode (currently dark mode)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_ZlJk"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/gropius-docs/">Gropius Backend</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/gropius-docs/modules">Modules</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/gropius-docs/github-sync">GitHub sync</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/gropius-docs/jira-sync">Jira sync</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/gropius-docs/login">Login Service</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/gropius-docs/how-to-login">How-To Login-Service (or rather Hot-To use the Gropius Backend at all)</a></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/gropius-docs/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Modules</span><meta itemprop="position" content="1"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><h1>Modules</h1><h1>Runnable Modules</h1><div class="mermaid-c4"></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="api-public">api-public<a href="#api-public" class="hash-link" aria-label="Direct link to api-public" title="Direct link to api-public"></a></h2><p>The main GraphQL API of the backend.
Can safely be publicly exposed and can be horizontally scaled.
By default, users have to be authenticated. A JWT must be obtained via the authentication service (tbd) and then provided with each GraphQL request using the Authorization-Header:</p><div class="language-kotlin codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-kotlin codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">Authorization</span><span class="token operator">:</span><span class="token plain"> Bearer token</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Authorization can be disabled for debugging purposes by setting <code>gropius.api.debugNoAuthentication=true</code>, however, note that mutations still require the token to determine the user (however permissions will not be checked).<br>
<!-- -->Depends on <a href="#api-common">api-common</a></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="configuration">Configuration<a href="#configuration" class="hash-link" aria-label="Direct link to Configuration" title="Direct link to Configuration"></a></h4><table><thead><tr><th>Spring property</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>gropius.api.public.debugNoAuthentication</td><td><code>false</code></td><td>If <code>true</code>, authorization is disabled</td></tr><tr><td>gropius.api.public.jwtSecret</td><td>- (required)</td><td>Secret for JWT validation. Caution: value is interpreted as Base64 encoded string!</td></tr></tbody></table><p>Configuration for <a href="https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#configure-spring-boot-project" target="_blank" rel="noopener noreferrer">Spring Data Neo4j</a> is required.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="requirements">Requirements<a href="#requirements" class="hash-link" aria-label="Direct link to Requirements" title="Direct link to Requirements"></a></h4><ul><li>Java >= 17</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="runtime-dependencies">Runtime Dependencies<a href="#runtime-dependencies" class="hash-link" aria-label="Direct link to Runtime Dependencies" title="Direct link to Runtime Dependencies"></a></h4><ul><li>Neo4j database</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="run">Run<a href="#run" class="hash-link" aria-label="Direct link to Run" title="Direct link to Run"></a></h4><div class="language-sh codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sh codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">./gradlew api-public:bootRun</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="api-internal">api-internal<a href="#api-internal" class="hash-link" aria-label="Direct link to api-internal" title="Direct link to api-internal"></a></h2><p>The internal GraphQL API of the backend.
MUST NOT be publicly exposed as no authentication or authorization is done.
Can be horizontally scaled.
If the <code>gropius.api.internal.apiToken</code> config property is set, users have to be authenticated using the Authorization-Header:</p><div class="language-kotlin codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-kotlin codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">Authorization</span><span class="token operator">:</span><span class="token plain"> Bearer token</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Depends on <a href="#api-common">api-common</a></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="configuration-1">Configuration<a href="#configuration-1" class="hash-link" aria-label="Direct link to Configuration" title="Direct link to Configuration"></a></h4><table><thead><tr><th>Name</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>gropius.api.internal.apiToken</td><td></td><td>If provided, each GraphQL request must provide the token in the Authorization header</td></tr></tbody></table><p>Configuration for <a href="https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#configure-spring-boot-project" target="_blank" rel="noopener noreferrer">Spring Data Neo4j</a> is required.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="requirements-1">Requirements<a href="#requirements-1" class="hash-link" aria-label="Direct link to Requirements" title="Direct link to Requirements"></a></h4><ul><li>Java >= 17</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="runtime-dependencies-1">Runtime Dependencies<a href="#runtime-dependencies-1" class="hash-link" aria-label="Direct link to Runtime Dependencies" title="Direct link to Runtime Dependencies"></a></h4><ul><li>Neo4j database</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="run-1">Run<a href="#run-1" class="hash-link" aria-label="Direct link to Run" title="Direct link to Run"></a></h4><div class="language-sh codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sh codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">./gradlew api-internal:bootRun</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="login-service">login-service<a href="#login-service" class="hash-link" aria-label="Direct link to login-service" title="Direct link to login-service"></a></h2><p>Nodejs/Nestjs service that does the user management and authentication for the gropius-backend.
It will generate tokens for the user to use to identify against the api.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="configuration-2">Configuration<a href="#configuration-2" class="hash-link" aria-label="Direct link to Configuration" title="Direct link to Configuration"></a></h4><details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>General settings</summary><div><div class="collapsibleContent_i85q"><table><thead><tr><th>Environment variable</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>GROPIUS_LOGIN_SPECIFIC_JWT_SECRET</td><td>- (required)</td><td>JWT secret used to sign tokens that are not access tokens to the backend. It is recommended to choos a different secret from GROPIUS_INTERNAL_BACKEND_JWT_SECRET to avoid token misuse. Make sure this is a LONG and RANDOM value and NOBONDY knows it. Else they can create valid tokens.</td></tr><tr><td>GROPIUS_JWT_ISSUER</td><td>gropius-login</td><td>The value to put in the issuer field all jwt signed.Can be any value but a unique value is recommended.</td></tr><tr><td>GROPIUS_ACCESS_TOKEN_EXPIRATION_TIME_MS</td><td>600000 (= 10min)</td><td>The time after which a issued access token for the backend expires and needs to be refreshed.Specify the value in ms.CAUTION: Access tokens can not easily be revoked. Don't make this time too long.</td></tr><tr><td>GROPIUS_OAUTH_CODE_EXPIRATION_TIME_MS</td><td>600000 (= 10min)</td><td>The time after which an oauth code, issued after finishing the oauth server flow, expires.This is the time a client has between receiving tha callback and fetching the access token.</td></tr><tr><td>GROPIUS_REGISTRATION_EXPIRATION_TIME_MS</td><td>600000 (= 10min)</td><td>The time after a registration of a new authentication until it expires. This is a time the USER between passing the authentication flow and submitting the registration form in the client.Don't set this too short or users will be frustrated, that they can't complete the registration.</td></tr><tr><td>GROPIUS_REGULAR_LOGINS_INACTIVE_EXPIRATION_TIME_MS</td><td>0</td><td>The time after which a regular login event (non sync login) will expire and refresh tokens become invalid. The actual time after which the user looses access is quantized by the expiration time of the issued access token. If 0, logins won't expire.</td></tr><tr><td>GROPIUS_PERFORM_IMS_USER_SEARCH_ON</td><td>=LOGIN,REG,REG_SYNC</td><td>The authentication events on which a search for yet unlinked ims users will be done. To link them to the authentication and (if present) the gropius user. Comma separated list.</td></tr><tr><td>GROPIUS_CLIENT_SECRET_LENGTH</td><td>48</td><td>The length (in bytes) of the generated client secrets for the oauth clients.</td></tr><tr><td>GROPIUS_LOGIN_LISTEN_PORT</td><td>3000</td><td>The port number on which to listen for API requests</td></tr></tbody></table></div></div></details><details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Gropius-backend internal API config</summary><div><div class="collapsibleContent_i85q"><table><thead><tr><th>Environment variable</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>GROPIUS_INTERNAL_BACKEND_ENDPOINT</td><td>http://localhost:8081/graphql</td><td>The full GraphQL-API endpoint URL of the internal backend api (usually ends with /graphql). Remember: If running in docker-compose, you can use the docker service name as hostname.</td></tr><tr><td>GROPIUS_INTERNAL_BACKEND_TOKEN</td><td></td><td>The API secret that the internal backend API expects to allow requests. Will be prefixed with "Bearer ".</td></tr><tr><td>GROPIUS_INTERNAL_BACKEND_JWT_SECRET</td><td>- (required)</td><td>Secret to be used to sign the access tokens that can be used with the backend. Must be the same value as configured in the backend so the tokens are accepted. It is recommended to choos a different secret from GROPIUS_LOGIN_SPECIFIC_JWT_SECRET to avoid token misuse. Make sure this is a LONG and RANDOM value and NOBONDY knows it. Else they can create valid tokens. Caution: value is interpreted as Base64 encoded string!</td></tr></tbody></table></div></div></details><details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Database (postgres) configuration</summary><div><div class="collapsibleContent_i85q"><table><thead><tr><th>Environment variable</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>GROPIUS_LOGIN_DATABASE_DRIVER</td><td>postgres</td><td>The database driver to use. Supported values: "postgres" (reccomended) and ("sqlite"). Note: The application relies on postgres specific types and SQL features in some places. The sqlite functionality is UNTESTED. To run the service without a running database (e.g. for api inspection) it is however useful to be able to switch to "sqlite".</td></tr><tr><td>GROPIUS_LOGIN_DATABASE_HOST</td><td>localhost</td><td>The hostname of the postgres databas server (remember: docker service names)</td></tr><tr><td>GROPIUS_LOGIN_DATABASE_PORT</td><td>5432</td><td>The port on which the postgres database is listening</td></tr><tr><td>GROPIUS_LOGIN_DATABASE_USER</td><td>postgres</td><td>The username in the postgres database to use</td></tr><tr><td>GROPIUS_LOGIN_DATABASE_PASSWORD</td><td>postgres</td><td>The password for the user specified above</td></tr><tr><td>GROPIUS_LOGIN_DATABASE_DATABASE</td><td>gropius</td><td>For postgres: Name of the database to use on the server. For sqlite: appended with ".sqlite" this specifies the Database file path</td></tr></tbody></table></div></div></details><details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Passport strategies options</summary><div><div class="collapsibleContent_i85q"><table><thead><tr><th>Environment variable</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>GROPIUS_PASSPORT_STATE_JWT_ISSUER</td><td>gropius-login-state</td><td>The issuer to use in JWTs used to preserve state while using a oauth authentication provider. Using a different value than with GROPIUS_JWT_ISSUER is recommended to avoid token misuse.</td></tr><tr><td>GROPIUS_BCRYPT_HASH_ROUNDS</td><td>10</td><td>The number of rounds to pass to bcrypt when in use (e.g. for auth client secrets, passwords, ...). The actual number of rounds will be 2^GROPIUS_BCRYPT_HASH_ROUNDS.Choosing this wisely is importand. Too low makes the hashes unsecure and too high makes hasing take too long.</td></tr></tbody></table></div></div></details><details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Sync-service API settings</summary><div><div class="collapsibleContent_i85q"><table><thead><tr><th>Environment variable</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>GROPIUS_LOGIN_SYNC_API_SECRET</td><td></td><td>The secret that is expected from a sync service client connecting to the sync API prefixed with "Bearer ". Set this to a long and unguessable value to ensure only the sync services can access tha api and request tokens from users.</td></tr></tbody></table></div></div></details><details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Entity management</summary><div><div class="collapsibleContent_i85q"><p>The following section allows creating default strategy instance and user for initialization.
If none of the values are set (i.e. if they're commented out), no entity creation will take place.</p><p>Parameters for creating a strategy instance.
Type and instance cnfig must be given for creation to happen.
The config should follow the same rules as when creating through the API.</p><table><thead><tr><th>Environment variable</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>GROPIUS_DEFAULT_STRATEGY_INSTANCE_TYPE</td><td>userpass</td><td>Type of the default strategy instance</td></tr><tr><td>GROPIUS_DEFAULT_STRATEGY_INSTANCE_CONFIG</td><td>{}</td><td>Config of the default strategy instance</td></tr><tr><td>GROPIUS_DEFAULT_STRATEGY_INSTANCE_NAME</td><td>userpass-local</td><td>Name of the default strategy instance</td></tr></tbody></table><p>Parameters for creating an admin user.
Username, displayName and strategy instance name are required for creation to happen.
This can only create users for strategies that accept credentials via POST.
(i.e. not for oauth, ...). The structure/valiables of the post data must be the same as for the API request.
If a user with that username already exists or the credentials aren't unique, the creation will fail.</p><table><thead><tr><th>Environment variable</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>GROPIUS_DEFAULT_USER_USERNAME</td><td>administrator</td><td>Name of the default user</td></tr><tr><td>GROPIUS_DEFAULT_USER_DISPLAYNAME</td><td>System-Admin</td><td>Display name of the default user</td></tr><tr><td>GROPIUS_DEFAULT_USER_POST_DATA</td><td>{"password": "admin"}</td><td>Credentials for the default user that would otherwise have been passed via POST</td></tr><tr><td>GROPIUS_DEFAULT_USER_STRATEGY_INSTANCE_NAME</td><td>userpass-local</td><td>Name of the authentication strategy instance used for credential management</td></tr></tbody></table><table><thead><tr><th>Environment variable</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>GROPIUS_DEFAULT_AUTH_CLIENT_NAME</td><td>initial-client</td><td>Parameter for creating an auth client. If this is set, an auth client with that name and with no requirement for secrets will be created. The clientId of the created/found auth client will be printed to the console on startup.</td></tr></tbody></table></div></div></details><h4 class="anchor anchorWithStickyNavbar_LWe7" id="requirements-2">Requirements<a href="#requirements-2" class="hash-link" aria-label="Direct link to Requirements" title="Direct link to Requirements"></a></h4><ul><li>Node >= 16.17.0</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="runtime-dependencies-2">Runtime Dependencies<a href="#runtime-dependencies-2" class="hash-link" aria-label="Direct link to Runtime Dependencies" title="Direct link to Runtime Dependencies"></a></h4><ul><li>Postgres database</li><li><a href="#internal-api">internal-api</a></li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="run-2">Run<a href="#run-2" class="hash-link" aria-label="Direct link to Run" title="Direct link to Run"></a></h4><div class="language-sh codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sh codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain"># install</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">./gradlew login-service:npm_install</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"># run</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">./gradlew login-service:npm_start</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="github">github<a href="#github" class="hash-link" aria-label="Direct link to github" title="Direct link to github"></a></h2><p>Github sync that executes exactly one sync cycle.
May not be executed more than once at the same time.
Documentation about the concept can be found <a href="/gropius-docs/github-sync">here</a>.<br>
<!-- -->Depends on <a href="#sync">sync</a></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="configuration-3">Configuration<a href="#configuration-3" class="hash-link" aria-label="Direct link to Configuration" title="Direct link to Configuration"></a></h4><table><thead><tr><th>Spring property</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>gropius.sync.github.maxMutationCount</td><td>100</td><td>Maximum number of Mutations per cycle that are allowed for one IMS</td></tr></tbody></table><p>Configuration for <a href="#sync">sync</a>, <a href="https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#configure-spring-boot-project" target="_blank" rel="noopener noreferrer">Spring Data Neo4j</a> and Spring Data MonoDB is required.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="requirements-3">Requirements<a href="#requirements-3" class="hash-link" aria-label="Direct link to Requirements" title="Direct link to Requirements"></a></h4><ul><li>Java >= 17</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="runtime-dependencies-3">Runtime Dependencies<a href="#runtime-dependencies-3" class="hash-link" aria-label="Direct link to Runtime Dependencies" title="Direct link to Runtime Dependencies"></a></h4><ul><li>Neo4j database</li><li>MongoDB database</li><li><a href="#login-service">login-service</a></li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="run-3">Run<a href="#run-3" class="hash-link" aria-label="Direct link to Run" title="Direct link to Run"></a></h4><div class="language-sh codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sh codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">./gradlew github:bootRun</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h1>Abstract Modules</h1><h2 class="anchor anchorWithStickyNavbar_LWe7" id="core">core<a href="#core" class="hash-link" aria-label="Direct link to core" title="Direct link to core"></a></h2><p>The core part of the Gropius backend, contains the domain model as well as service and repository classes.<br>
<!-- -->Requires a Neo4j database, for the configuration see <a href="https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#configure-spring-boot-project" target="_blank" rel="noopener noreferrer">Configure the project</a>.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="configuration-4">Configuration<a href="#configuration-4" class="hash-link" aria-label="Direct link to Configuration" title="Direct link to Configuration"></a></h4><p>Configuration for <a href="https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#configure-spring-boot-project" target="_blank" rel="noopener noreferrer">Spring Data Neo4j</a> is required.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="requirements-4">Requirements<a href="#requirements-4" class="hash-link" aria-label="Direct link to Requirements" title="Direct link to Requirements"></a></h4><ul><li>Java >= 17</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="runtime-dependencies-4">Runtime Dependencies<a href="#runtime-dependencies-4" class="hash-link" aria-label="Direct link to Runtime Dependencies" title="Direct link to Runtime Dependencies"></a></h4><ul><li>Neo4j database</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="api-common">api-common<a href="#api-common" class="hash-link" aria-label="Direct link to api-common" title="Direct link to api-common"></a></h2><p>Contains common functionality for <a href="#api-public">api-public</a> and <a href="#api-internal">api-internal</a>.<br>
<!-- -->By default, the API is provided on port 8080 at the endpoint <code>/graphql</code>, a GraphiQL can be found at <code>/graphiql</code>.
For the configuration of the GraphQL endpoints, see <a href="https://opensource.expediagroup.com/graphql-kotlin/docs/server/spring-server/spring-properties" target="_blank" rel="noopener noreferrer">Configuration Properties</a>.<br>
<!-- -->Depends on <a href="#core">core</a></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="configuration-5">Configuration<a href="#configuration-5" class="hash-link" aria-label="Direct link to Configuration" title="Direct link to Configuration"></a></h4><p>Configuration for <a href="https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#configure-spring-boot-project" target="_blank" rel="noopener noreferrer">Spring Data Neo4j</a> is required.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="requirements-5">Requirements<a href="#requirements-5" class="hash-link" aria-label="Direct link to Requirements" title="Direct link to Requirements"></a></h4><ul><li>Java >= 17</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="runtime-dependencies-5">Runtime Dependencies<a href="#runtime-dependencies-5" class="hash-link" aria-label="Direct link to Runtime Dependencies" title="Direct link to Runtime Dependencies"></a></h4><ul><li>Neo4j database</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="sync">sync<a href="#sync" class="hash-link" aria-label="Direct link to sync" title="Direct link to sync"></a></h2><p>Contains abstract helpers for general sync development.<br>
<!-- -->Depends on <a href="#core">core</a></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="configuration-6">Configuration<a href="#configuration-6" class="hash-link" aria-label="Direct link to Configuration" title="Direct link to Configuration"></a></h4><table><thead><tr><th>Spring property</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td>gropius.sync.loginServiceBase</td><td>- (required)</td><td>Base url of the login service</td></tr><tr><td>gropius.sync.apiSecret</td><td>- (required)</td><td>Secret for login service</td></tr></tbody></table><p>Configuration for <a href="https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#configure-spring-boot-project" target="_blank" rel="noopener noreferrer">Spring Data Neo4j</a> is required.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="requirements-6">Requirements<a href="#requirements-6" class="hash-link" aria-label="Direct link to Requirements" title="Direct link to Requirements"></a></h4><ul><li>Java >= 17</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="runtime-dependencies-6">Runtime Dependencies<a href="#runtime-dependencies-6" class="hash-link" aria-label="Direct link to Runtime Dependencies" title="Direct link to Runtime Dependencies"></a></h4><ul><li>Neo4j database</li><li><a href="#login-service">login-service</a></li></ul></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/gropius-docs/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Gropius Backend</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/gropius-docs/github-sync"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">GitHub sync</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#api-public" class="table-of-contents__link toc-highlight">api-public</a></li><li><a href="#api-internal" class="table-of-contents__link toc-highlight">api-internal</a></li><li><a href="#login-service" class="table-of-contents__link toc-highlight">login-service</a></li><li><a href="#github" class="table-of-contents__link toc-highlight">github</a></li><li><a href="#core" class="table-of-contents__link toc-highlight">core</a></li><li><a href="#api-common" class="table-of-contents__link toc-highlight">api-common</a></li><li><a href="#sync" class="table-of-contents__link toc-highlight">sync</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="footer__bottom text--center"><div class="footer__copyright">Built with Docusaurus.</div></div></div></footer></div>
<script src="/gropius-docs/assets/js/runtime~main.836956a5.js"></script>
<script src="/gropius-docs/assets/js/main.309bbcf4.js"></script>
</body>
</html>