File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ A REST API built with Spring Boot that fetches users from [DummyJSON Users API](
1515
1616---
1717
18- ## 📦 Prerequisites
18+ ## 📦 Prerequisites
1919
2020- Java 25+
2121- Docker Desktop
@@ -120,36 +120,12 @@ POSTGRES_PASSWORD=your_password
120120POSTGRES_DB=your_database
121121POSTGRES_PORT=5432
122122
123- # Spring Security
124- APP_SECURITY_ADMIN_USER=admin
125- APP_SECURITY_ADMIN_PASSWORD=admin123
126- APP_SECURITY_USER=apiuser
127- APP_SECURITY_PASSWORD=changeit
128- APP_SECURITY_TEST_USER=testuser
129- APP_SECURITY_TEST_PASSWORD=testpass
130-
131123# Liquibase (optional, defaults provided)
132124LB_CHANGELOG=db/changelog/db.changelog-master.yaml
133125LB_SCHEMA=public
134126SPRING_LIQUIBASE_ENABLED=true
135127```
136128
137- ### Spring Security
138-
139- The API uses HTTP Basic authentication with three in-memory roles:
140-
141- - ` ADMIN ` : can read, create, update and delete users
142- - ` USER ` : can read users
143- - ` TEST ` : can read users and is used by automated tests
144-
145- Protected endpoints require credentials. Example:
146-
147- ``` bash
148- curl -u apiuser:changeit " http://localhost:8080/random-users"
149- ```
150-
151- Swagger UI remains publicly accessible, while API endpoints are protected according to the role rules above.
152-
153129### External API Configuration
154130
155131` application.properties ` uses:
You can’t perform that action at this time.
0 commit comments