Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
d0543d8
#111 sso-remote-auth - API, service and auth phases cache
vis-86 Dec 1, 2025
3a44391
#110 - Add support for RSA key pair generation and storage for subsys…
Dec 2, 2025
987bc5c
#111 sso-remote-auth - API, service and auth phases cache
vis-86 Dec 3, 2025
3a80f2f
#110 - Extend subsystem properties to include encryption algorithm, i…
Dec 3, 2025
7fb4d2d
#111 sso-remote-auth - API, service and auth phases cache
vis-86 Dec 5, 2025
cbfdc46
#111 remote login css update
vis-86 Dec 5, 2025
e81c47f
#111 sso-remote-auth
vis-86 Dec 5, 2025
acd45c5
#111 sso-remote-auth
vis-86 Dec 5, 2025
bb05f8f
#111 ui updates
vis-86 Dec 8, 2025
ecca869
#111 prepare ot release
vis-86 Dec 8, 2025
547a9f6
#111 fix SSOChangePasswordPageTest
vis-86 Dec 8, 2025
e808c96
[maven-release-plugin] prepare release superfly-parent-1.7-34
vis-86 Dec 8, 2025
6a49f3f
[maven-release-plugin] prepare for next development iteration
vis-86 Dec 8, 2025
c0ef3be
#111 update tag
vis-86 Dec 8, 2025
748a6a5
[maven-release-plugin] prepare release superfly-parent-1.7-35
vis-86 Dec 8, 2025
3641ccf
[maven-release-plugin] prepare for next development iteration
vis-86 Dec 8, 2025
a3cd5ea
#111 disable autocomplete
vis-86 Dec 9, 2025
a4f40b9
#111 disable autocomplete
vis-86 Dec 9, 2025
131e004
fixes #19 - add events for user passwords reset, user block , user su…
kuccyp Mar 26, 2026
94a8f1f
fixes #19 - add events for user passwords reset, user block , user su…
kuccyp Mar 30, 2026
319ae58
fixes #19 - add events for user passwords reset, user block , user su…
kuccyp Apr 1, 2026
c1baffe
Merge pull request #120 from payneteasy/issue19_events
AndreyFX91 Apr 2, 2026
e39eb85
#119 - Switch test implementation from `MessageDigestPasswordEncoder`…
Apr 2, 2026
5c90437
#119 Add missing JAXB dependencies and istack runtime to POM files to…
Apr 2, 2026
b86210c
[maven-release-plugin] prepare release superfly-parent-1.7-36
Apr 2, 2026
47c5b26
[maven-release-plugin] prepare for next development iteration
Apr 2, 2026
15963a3
Fix ui_get_actions_list_with_group: include actions without group
vis-86 May 13, 2026
00e5511
sso-remote-auth - API, service and auth phases cache
vis-86 Dec 1, 2025
e1d0969
110 - Add support for RSA key pair generation and storage for subsystems
Dec 2, 2025
63e443a
#111 sso-remote-auth - API, service and auth phases cache
vis-86 Dec 3, 2025
48d61f9
110 - Extend subsystem properties to include encryption algorithm, im…
Dec 3, 2025
a188516
#111 sso-remote-auth - API, service and auth phases cache
vis-86 Dec 5, 2025
5fbe09a
#111 remote login css update
vis-86 Dec 5, 2025
4ab3375
#111 sso-remote-auth
vis-86 Dec 5, 2025
27d4e54
#111 sso-remote-auth
vis-86 Dec 5, 2025
9ed8993
#111 ui updates
vis-86 Dec 8, 2025
57f5e92
111 prepare ot release
vis-86 Dec 8, 2025
4b7ff84
111 fix SSOChangePasswordPageTest
vis-86 Dec 8, 2025
c11aa1a
111 disable autocomplete
vis-86 May 20, 2026
dba65d6
#111 disable autocomplete
vis-86 Dec 9, 2025
718ae2a
Merge origin/1.7.x into master: events API, JAXB deps, SQL fix, rest-…
vis-86 May 20, 2026
b11ef8b
Fix compilation and test failures after 1.7.x merge
vis-86 May 20, 2026
60d8d85
#111 add EE8/EE10 split modules for javax/jakarta servlet compatibility
vis-86 May 20, 2026
19cc415
Add AI Factory context, Docker setup, and project documentation
vis-86 May 20, 2026
891dff7
docs: add domain-model.md and api.md, update navigation
vis-86 May 20, 2026
b09f371
fix(sql): fix migration script defaults, log paths, and run_install_c…
vis-86 May 20, 2026
0932b4d
fix(web): register HOTPProvider bean and configure dev Jetty datasource
vis-86 May 20, 2026
c341792
docs: rewrite getting-started with verified local setup steps
vis-86 May 20, 2026
a2f08c8
chore: add AI factory and Claude Code paths to .gitignore
vis-86 May 20, 2026
caf0877
fix: fix pseudoAuthenticate endpoint and int_create_event silent failure
vis-86 May 22, 2026
ad9bfef
fix: fix RemoteAuth HTTP status codes and R1.7.3 migration idempotency
vis-86 May 22, 2026
ece491e
fix(events): add subsystem isolation to events (BUG-5) and fix stale …
vis-86 May 22, 2026
30d035b
refactor(client): migrate from superfly-client to superfly-client-core
vis-86 May 22, 2026
ad5f154
fix(security): prevent token/exception leakage in logs and HTTP respo…
vis-86 May 22, 2026
e023a3d
docs(security): document intentional CSRF disable in SpringSecurityCo…
vis-86 May 22, 2026
9df5d56
fix(security): add Content-Security-Policy header (M1)
vis-86 May 22, 2026
cd56e34
fix(common): remove duplicate JakartaHttpSessionWrapper and jakarta d…
vis-86 May 22, 2026
7e4c35d
refactor: rename superfly-spring-security to superfly-spring-security…
vis-86 May 22, 2026
4d10108
test(ee8,ee10): add unit tests for Javax/JakartaHttpSessionWrapper
vis-86 May 22, 2026
9bbcb55
fix(ee8): resolve Spring 5/6 classpath conflict in security modules
vis-86 May 22, 2026
1368711
fix(FIX-3): delete dead superfly-client module
vis-86 May 25, 2026
0c4aa0e
build(ee8): extract Spring 5.x versions into parent POM properties
vis-86 May 25, 2026
ed059c5
fix(ee8): remove accidental jakarta.servlet-api from superfly-client-opt
vis-86 May 25, 2026
91ba8b1
test(fix5): add JakartaServletIsolationTest; update docs for servlet-…
vis-86 May 25, 2026
e418a8f
docs(fix6): fix session classes location in migration guide; add smok…
vis-86 May 25, 2026
03b9ce6
fix(security): harden subsystem and X509 auth against PCI DSS risks
vis-86 May 25, 2026
62802d5
fix(sql): add missing subsystem_id arg to int_create_event in reset_p…
vis-86 May 25, 2026
0fd6712
fix(web): serve jQuery locally to satisfy CSP; fix livesearch input e…
vis-86 May 25, 2026
bdeb083
feat(web): add role name autocomplete search to ListRolesPage
vis-86 May 25, 2026
f64b979
feat(httpclient-ssl): add JdkSslSocketFactoryBuilder with CN hostname…
vis-86 May 26, 2026
4462597
docs(ssl-mtls): add SSL/mTLS integration guide
vis-86 May 26, 2026
ab01a63
refactor(remote-api): DI-based SSOHttpServiceApiClient with per-endpo…
vis-86 May 27, 2026
179100c
test+docs(remote-api): cover per-endpoint timeouts, AutoCloseable, ty…
vis-86 May 27, 2026
c29e393
feat(remote-api): add ApacheHC5HttpClient transport with connection p…
vis-86 May 27, 2026
2bcfa06
feat(web/monitoring): add MonitoringPage with SSO metrics and Prometh…
vis-86 May 27, 2026
fe3a508
fix(web/metrics): correct @Qualifier bean name for SSOServiceImpl
vis-86 May 27, 2026
e68ca43
feat(remote-api): add MetricsSSOService decorator with Micrometer met…
vis-86 May 27, 2026
938fd09
fix(remote-api): mark httpclient5 as optional dependency
vis-86 May 27, 2026
2fd452f
refactor(httpclient): extract ApacheHC5HttpClient into superfly-httpc…
vis-86 May 27, 2026
bc9b682
build(pom): register superfly-httpclient-hc5 in root dependencyManage…
vis-86 May 28, 2026
ac67bd8
docs+feat: remove MetricsSSOService and related metrics/health docume…
vis-86 May 28, 2026
4f4db3c
chore(repo): untrack AI Factory/tooling artifacts and extend .gitignore
vis-86 Jun 1, 2026
90a5317
chore(repo): remove unused book resource file
vis-86 Jun 1, 2026
0a111e2
refactor(remote-api): drop XML remoting (xstream/xremoting/hessian), …
vis-86 Jun 1, 2026
89bd6bc
refactor(scheduling): replace Quartz with Spring @Scheduled, drop qua…
vis-86 Jun 1, 2026
07301e8
refactor(web): remove dead applicationContext-service.xml
vis-86 Jun 1, 2026
c98befd
fix(test): stop SchedulingContextWiringTest.StubBeans leaking into ap…
vis-86 Jun 1, 2026
297762a
refactor(service): update `getEvents` to use explicit method argument…
vis-86 Jun 1, 2026
5127ab9
refactor(httpclient): migrate to hc5, drop httpclient-ssl module
vis-86 Jun 1, 2026
89ebe26
build(deps): bump spring-security/wicket (EE10+EE8) and commons-fileu…
vis-86 Jun 1, 2026
7b92c84
chore(security): prune obsolete dependency-check suppressions; verify…
vis-86 Jun 1, 2026
7135db2
docs(ssl): reconcile SSL/mTLS docs with hc5 transport
vis-86 Jun 1, 2026
e5577b5
build(security): scope EE8 framework deps to provided + guard transit…
vis-86 Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 47 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Version control
.git
.gitignore

# Docker files themselves
Dockerfile
compose*.yml
.dockerignore
docker/

# Build output (rebuilt inside Docker)
**/target/
**/*.war
**/*.jar
!install/*.jar

# IDE and editor
.idea/
*.iml
.vscode/
*.swp
*.swo

# AI Factory
.ai-factory/
.claude/
AGENTS.md

# OS
.DS_Store
Thumbs.db

# Logs
*.log
logs/

# Environment files (never bake into image)
.env
.env.*
!.env.example

# Test artifacts
**/surefire-reports/
**/failsafe-reports/

# Maven wrapper (already COPY'd explicitly if needed)
# Keep mvnw / .mvn in the image for development stage
23 changes: 23 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ─────────────────────────────────────────────────────────────────────────────
# Superfly — Docker environment variables
# Copy to .env and fill in values. Never commit .env to git.
# ─────────────────────────────────────────────────────────────────────────────

# Project name (used as Docker Compose project prefix)
COMPOSE_PROJECT_NAME=superfly

# ─── Application ─────────────────────────────────────────────────────────────
APP_PORT=8080
# For production: pre-built image tag
# APP_IMAGE=registry.example.com/superfly
# APP_VERSION=2.0.0

# ─── Database ────────────────────────────────────────────────────────────────
DB_NAME=sso
DB_USER=sso
DB_PASSWORD=change_me_in_production
DB_ROOT_PASSWORD=change_root_password_in_production
DB_TIMEZONE=UTC

# Development: expose MySQL port to host
MYSQL_HOST_PORT=3306
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,20 @@ target
.classpath
.project
.settings

# Docker secrets — never commit
.env

# AI Factory / Claude Code — local tooling, not for repo
.ai-factory.json
.ai-factory/
.claude/
.cursor/
.mcp.json
skills-lock.json
PLAN.md
FIX_PLAN.md

# IDE run configs & generated plan docs — local, not for repo
.run/
docs/plans/
16 changes: 0 additions & 16 deletions .run/Start.run.xml

This file was deleted.

131 changes: 131 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# AGENTS.md

> Этот файл — структурная карта проекта для AI-агентов и новых разработчиков.
> Обновлять при значительных изменениях структуры проекта.

## Обзор проекта

Superfly — централизованный SSO-сервер для управления пользователями, ролями и правами
доступа в нескольких системах одновременно. Поддерживает Spring Security, Wicket-UI и
EE8/EE10 (javax/jakarta servlet) клиентские библиотеки.

## Технологический стек

- **Язык:** Java 21
- **Фреймворк:** Spring Framework 6.2.18 + Spring Security 6.4.11
- **Веб-UI:** Apache Wicket 10.6.0
- **База данных:** MySQL (stored procedures, jdbc-proc)
- **Logging:** SLF4J 2.0 + Logback
- **Сборка:** Maven (multi-module, 20 модулей)
- **CI:** GitHub Actions

## Структура проекта

```
superfly/
├── pom.xml # корневой POM, версии всех зависимостей
├── AGENTS.md # этот файл
├── README.md # описание проекта
├── mvnw / mvnw.cmd # Maven wrapper
├── .github/workflows/ # GitHub Actions CI
│ └── maven.yml
├── superfly-remote-api/ # REST/RPC API интерфейсы для клиентов
├── superfly-spi/ # SPI-интерфейсы (HOTP, соль и др.)
├── superfly-spi-support/ # Реализации SPI
├── superfly-service/ # Бизнес-логика: пользователи, роли, права
│ └── src/main/java/com/payneteasy/superfly/
│ ├── dao/ # DAO через jdbc-proc (stored procedures)
│ ├── service/ # Spring @Service — бизнес-операции
│ ├── model/ # Доменные модели и UI-модели (UI* prefix)
│ ├── password/ # Хэширование паролей
│ ├── hotp/ # HOTP/2FA
│ ├── email/ # Email-уведомления
│ └── spring/ # Spring конфигурация, условия
├── superfly-web/ # Веб-приложение (Wicket + Spring MVC, Jetty)
│ └── src/main/java/com/payneteasy/superfly/web/wicket/
│ ├── page/ # Wicket страницы (users, roles, actions...)
│ ├── component/ # Переиспользуемые Wicket компоненты
│ └── security/ # Security-интеграция для веб-слоя
├── superfly-client-core/ # Клиент без servlet зависимости
├── superfly-client-ee8/ # Клиент для javax.servlet (EE8)
├── superfly-client-ee10/ # Клиент для jakarta.servlet (EE10)
├── superfly-client/ # Клиент (алиас/агрегат)
├── superfly-client-web-security/ # Web security клиент
├── superfly-client-opt/ # Клиент с опциональными фичами
├── superfly-spring-security-core/ # Spring Security integration (core, без servlet)
├── superfly-spring-security-ee8/ # Spring Security для EE8 (javax.servlet)
├── superfly-spring-security/ # Spring Security для EE10 (jakarta.servlet)
├── superfly-wicket/ # Wicket компоненты (EE10)
├── superfly-wicket-ee8/ # Wicket компоненты (EE8)
├── superfly-common/ # Shared utilities
├── superfly-crypto/ # Шифрование, хэширование
├── superfly-httpclient-hc5/ # HTTP client (Apache HC5) + SSL/mTLS хелперы
├── superfly-sql/ # SQL-скрипты и миграции
│ ├── src/ # Stored procedures
│ └── mi/ # Миграции: R<version>/<desc>.sql
├── superfly-integration-test/ # Интеграционные тесты (против реальной MySQL)
└── superfly-demo/ # Демо-приложение
```

## Ключевые точки входа

| Файл | Назначение |
|------|-----------|
| `pom.xml` | Корневой POM, версии зависимостей (`spring.version`, `wicket.version` и др.) |
| `superfly-web/src/main/webapp/WEB-INF/jetty-web.xml` | Конфигурация Jetty |
| `superfly-web/src/main/resources/jetty-env.conf` | Переменные окружения Jetty |
| `superfly-service/src/main/java/.../spring/` | Spring Application Context конфигурации |
| `superfly-sql/mi/` | SQL-миграции базы данных |
| `.github/workflows/maven.yml` | CI pipeline |

## Документация

| Документ | Путь | Описание |
|----------|------|---------|
| README | README.md | Landing page проекта |
| Установка и запуск | docs/getting-started.md | Требования, сборка, первый запуск |
| Конфигурация | docs/configuration.md | БД, Jetty, Spring конфиги |
| Доменная модель | docs/domain-model.md | Сущности, связи, перечисления |
| API Reference | docs/api.md | RPC и REST endpoints |
| Руководство по интеграции | docs/integration-guide.md | Подключение клиентских приложений |
| Миграция EE8 / EE10 | docs/migration-client-ee8-ee10.md | Переход на раздельные модули |
| Выпуск релиза | docs/releasing.md | Публикация в Maven Central |

## AI Context файлы

| Файл | Назначение |
|------|-----------|
| AGENTS.md | Карта проекта для AI-агентов |
| .ai-factory/DESCRIPTION.md | Детальное описание стека и модулей |
| .ai-factory/ARCHITECTURE.md | Clean Architecture: слои, правила зависимостей, примеры кода |
| .ai-factory/rules/base.md | Кодовые конвенции проекта |
| .ai-factory/config.yaml | Настройки AI Factory |

## Docker

| Файл | Назначение |
|------|-----------|
| `Dockerfile` | Multi-stage: builder → production (Jetty 12) + development (mvn jetty:run) |
| `compose.yml` | База: app + MySQL 8.0 |
| `compose.override.yml` | Dev-оверрайды: source mount, Maven hot-reload |
| `compose.production.yml` | Hardened production: read_only, cap_drop, resource limits |
| `docker/jetty/ROOT.xml` | Jetty context descriptor с JNDI datasource (env vars) |
| `docker/jetty/entrypoint.sh` | Передаёт DB-параметры как Java system properties |
| `.env.example` | Шаблон переменных окружения |

## Правила для агентов

- Команды git выполнять по одной — не объединять в цепочку:
- Неправильно: `git checkout master && git pull`
- Правильно: сначала `git checkout master`, затем `git pull origin master`
- Не мешать javax.servlet и jakarta.servlet в одном модуле — см. EE8/EE10 разделение
- Интеграционные тесты требуют реальный MySQL — не заменять на H2/mock
- Слой данных — только stored procedures через jdbc-proc, без JPA/Hibernate
94 changes: 94 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# syntax=docker/dockerfile:1
# ─────────────────────────────────────────────────────────────────────────────
# Stage 1: Build WAR and collect runtime JARs
# ─────────────────────────────────────────────────────────────────────────────
FROM maven:3.9-eclipse-temurin-21-alpine AS builder
WORKDIR /build

# Prefetch dependencies separately so this layer is cached
COPY pom.xml ./
COPY */pom.xml ./
# Hack: copy individual module poms while preserving directory structure
RUN --mount=type=cache,target=/root/.m2 \
find . -name "pom.xml" -exec dirname {} \; | xargs -I{} mkdir -p {} 2>/dev/null; true

COPY . .

# Build WAR (skip tests; tests require a live MySQL)
RUN --mount=type=cache,target=/root/.m2 \
./mvnw -B -DskipTests -pl superfly-web -am package

# Download JARs that are test-scoped but required at Jetty runtime
RUN --mount=type=cache,target=/root/.m2 \
./mvnw -B dependency:copy \
-Dartifact=com.mysql:mysql-connector-j:8.2.0:jar \
-DoutputDirectory=/build/jetty-lib && \
./mvnw -B dependency:copy \
-Dartifact=org.apache.commons:commons-dbcp2:2.13.0:jar \
-DoutputDirectory=/build/jetty-lib && \
./mvnw -B dependency:copy \
-Dartifact=org.apache.commons:commons-pool2:2.12.0:jar \
-DoutputDirectory=/build/jetty-lib

# ─────────────────────────────────────────────────────────────────────────────
# Stage 2: Production image — Jetty 12 + WAR + JNDI datasource from env vars
# ─────────────────────────────────────────────────────────────────────────────
FROM eclipse-temurin:21-jre-alpine AS production

ARG JETTY_VERSION=12.0.32
ENV JETTY_HOME=/opt/jetty
ENV JETTY_BASE=/var/lib/jetty
ENV JETTY_PORT=8080

# Install Jetty standalone
RUN apk add --no-cache curl gettext && \
curl -fsSL "https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/${JETTY_VERSION}/jetty-home-${JETTY_VERSION}.tar.gz" \
| tar xz -C /opt && \
mv /opt/jetty-home-${JETTY_VERSION} ${JETTY_HOME}

# Set up Jetty base with required modules
RUN mkdir -p ${JETTY_BASE}/webapps ${JETTY_BASE}/lib/ext && \
cd ${JETTY_BASE} && \
java -jar ${JETTY_HOME}/start.jar \
--add-modules=server,http,deploy,webapp,jndi,plus,annotations,logging-jetty

# Copy WAR and extra JARs
COPY --from=builder /build/superfly-web/target/superfly.war ${JETTY_BASE}/webapps/ROOT.war
COPY --from=builder /build/jetty-lib/ ${JETTY_BASE}/lib/ext/

# Copy context descriptor and entrypoint
COPY docker/jetty/ROOT.xml ${JETTY_BASE}/webapps/ROOT.xml
COPY docker/jetty/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Non-root user
RUN addgroup -S jetty && adduser -S jetty -G jetty && \
chown -R jetty:jetty ${JETTY_BASE}
USER jetty

EXPOSE ${JETTY_PORT}

HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD wget -qO- http://localhost:${JETTY_PORT}/ >/dev/null 2>&1 || exit 1

ENTRYPOINT ["/entrypoint.sh"]
CMD ["java", "-jar", "/opt/jetty/start.jar"]

# ─────────────────────────────────────────────────────────────────────────────
# Stage 3: Development image — Maven + hot-reload via jetty:run
# ─────────────────────────────────────────────────────────────────────────────
FROM maven:3.9-eclipse-temurin-21-alpine AS development
WORKDIR /app

# Pre-fetch dependencies
COPY pom.xml ./
COPY */pom.xml ./
RUN --mount=type=cache,target=/root/.m2 \
./mvnw -B dependency:go-offline -pl superfly-web -am || true

COPY . .

EXPOSE 8080

# jetty:run uses jetty-env.conf for JNDI — override via -Djetty.jndi.* if needed
CMD ["./mvnw", "-pl", "superfly-web", "jetty:run"]
Loading
Loading