📁
Journal de bord
  • Introduction
  • Single Page Application
    • Overview
    • Installation
    • Features
    • Design
    • Development
    • Backend integration
  • Backend
    • Overview
    • Installation
    • Configuration
    • Development
    • Data Model
    • API reference
      • Rides
      • Drivers
    • Database management
  • Security
    • Overview
    • OAuth 2.0
    • Authorization Server (Keycloak)
    • Client-side flow
    • OpenID Connect
Powered by GitBook
On this page
  • Resource server configuration
  • Security
  • Keycloak server configuration
  • Dependency
  • Project properties

Was this helpful?

  1. Backend

Configuration

Resource server configuration

spring:
  security:
    oauth2:
      resourceserver:
        jwt:
          issuer-uri: <authorization-server-base-url>
          jwk-set-uri: <authorization-server-base-url>/protocol/openid-connect/certs
  datasource:
    url: <database-url>
    driverClassName: <driver-class>
    username: admin
    password: <password>
  jpa:
    database-platform: <value>
application:
  allowed-origins: <origins,...>

Security

Keycloak server configuration

  1. Create a client

  2. Create a new role

Dependency

<dependencies>
    ...
    <dependency>
        <groupId>org.keycloak</groupId>
        <artifactId>keycloak-spring-boot-starter</artifactId>
        <version>11.0.2</version>
    </dependency>
</dependencies>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.keycloak.bom</groupId>
            <artifactId>keycloak-adapter-bom</artifactId>
            <version>11.0.2</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Project properties

PreviousInstallationNextDevelopment

Last updated 4 years ago

Was this helpful?

The Spring Boot application resources are secured using the Keycloak management system. This section summarizes the steps described in this tutorial: .

The is a required dependency and should be added to the project pom.xml file.

setup the resource server
keycloak-spring-boot-started