From ccc326c33d687185e3779bbb9ff802a59d654049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ROMINA=20JULIETA=20SU=C3=81REZ?= Date: Sun, 26 Jul 2026 13:08:31 -0300 Subject: [PATCH 1/3] Innit approach at adding jdk 25 to dataset, and jasper api --- README.md | 2 + jdk_25_maven/cs/pom.xml | 18 + jdk_25_maven/cs/rest/jasper/.dockerignore | 32 + jdk_25_maven/cs/rest/jasper/.editorconfig | 20 + jdk_25_maven/cs/rest/jasper/.gitattributes | 150 + jdk_25_maven/cs/rest/jasper/.m2/settings.xml | 13 + jdk_25_maven/cs/rest/jasper/LICENSE | 21 + jdk_25_maven/cs/rest/jasper/README.md | 1032 ++++ jdk_25_maven/cs/rest/jasper/pom.xml | 537 ++ .../main/java/jasper/JasperApplication.java | 29 + .../src/main/java/jasper/aop/ClearIdle.java | 16 + .../src/main/java/jasper/aop/IdleAspect.java | 56 + .../jasper/aop/logging/LoggingAspect.java | 102 + .../main/java/jasper/client/JasperClient.java | 135 + .../main/java/jasper/client/OembedClient.java | 15 + .../main/java/jasper/client/ScimClient.java | 41 + .../main/java/jasper/client/TokenClient.java | 18 + .../java/jasper/client/dto/JasperMapper.java | 16 + .../java/jasper/component/AccessToken.java | 46 + .../main/java/jasper/component/Backup.java | 322 + .../java/jasper/component/ConfigCache.java | 345 ++ .../src/main/java/jasper/component/Fetch.java | 15 + .../java/jasper/component/FetchImplCache.java | 32 + .../java/jasper/component/FetchImplHttp.java | 118 + .../main/java/jasper/component/FileCache.java | 365 ++ .../main/java/jasper/component/HttpCache.java | 32 + .../jasper/component/HttpClientFactory.java | 117 + .../main/java/jasper/component/Images.java | 118 + .../main/java/jasper/component/Ingest.java | 258 + .../java/jasper/component/IngestBundle.java | 118 + .../main/java/jasper/component/IngestExt.java | 170 + .../java/jasper/component/IngestPlugin.java | 167 + .../java/jasper/component/IngestTemplate.java | 167 + .../java/jasper/component/IngestUser.java | 168 + .../main/java/jasper/component/Messages.java | 232 + .../src/main/java/jasper/component/Meta.java | 207 + .../jasper/component/OembedProviders.java | 75 + .../main/java/jasper/component/Preload.java | 111 + .../java/jasper/component/ProfileManager.java | 21 + .../jasper/component/ProfileManagerScim.java | 182 + .../src/main/java/jasper/component/Proxy.java | 125 + .../java/jasper/component/Replicator.java | 582 ++ .../src/main/java/jasper/component/Rng.java | 54 + .../main/java/jasper/component/Sanitizer.java | 210 + .../main/java/jasper/component/Scraper.java | 499 ++ .../component/ScriptExecutorFactory.java | 132 + .../java/jasper/component/ScriptRunner.java | 161 + .../main/java/jasper/component/Storage.java | 67 + .../jasper/component/StorageImplLocal.java | 308 + .../main/java/jasper/component/Tagger.java | 261 + .../java/jasper/component/TunnelClient.java | 350 ++ .../main/java/jasper/component/Validate.java | 355 ++ .../component/channel/ClearConfigCache.java | 77 + .../java/jasper/component/channel/Index.java | 93 + .../java/jasper/component/channel/Pull.java | 275 + .../java/jasper/component/channel/Push.java | 137 + .../java/jasper/component/channel/Stomp.java | 102 + .../component/channel/TunnelServer.java | 47 + .../channel/TunnelServerImplFile.java | 91 + .../channel/TunnelServerImplK8s.java | 90 + .../java/jasper/component/channel/Watch.java | 111 + .../java/jasper/component/cron/Backfill.java | 63 + .../main/java/jasper/component/cron/Cron.java | 233 + .../component/cron/ExpireScriptDeps.java | 68 + .../main/java/jasper/component/cron/Pull.java | 38 + .../main/java/jasper/component/cron/Push.java | 38 + .../java/jasper/component/cron/Recycler.java | 29 + .../java/jasper/component/cron/Script.java | 75 + .../java/jasper/component/delta/Async.java | 194 + .../jasper/component/delta/DeltaScript.java | 80 + .../java/jasper/component/delta/Mail.java | 124 + .../component/dto/AuthTokenResponse.java | 13 + .../java/jasper/component/dto/Bundle.java | 19 + .../component/dto/ComponentDtoMapper.java | 81 + .../java/jasper/component/dto/JsonLd.java | 46 + .../component/dto/MetadataUpdateDto.java | 22 + .../jasper/component/dto/RefUpdateDto.java | 37 + .../jasper/component/dto/ScimPatchOp.java | 34 + .../component/dto/ScimUserResource.java | 28 + .../jasper/component/script/DeltaCache.java | 36 + .../jasper/component/script/DeltaScrape.java | 71 + .../jasper/component/script/RssParser.java | 427 ++ .../component/script/ScriptDefaults.java | 34 + .../java/jasper/component/vm/JavaScript.java | 71 + .../main/java/jasper/component/vm/Python.java | 118 + .../java/jasper/component/vm/RunProcess.java | 83 + .../main/java/jasper/component/vm/Shell.java | 59 + .../jasper/config/AsyncConfiguration.java | 61 + .../main/java/jasper/config/AuthConfig.java | 81 + .../jasper/config/BulkheadConfiguration.java | 89 + .../main/java/jasper/config/CacheConfig.java | 105 + .../src/main/java/jasper/config/Config.java | 401 ++ .../main/java/jasper/config/Constants.java | 11 + .../jasper/config/DatabaseConfiguration.java | 12 + .../config/DateTimeFormatConfiguration.java | 20 + .../jasper/config/FeignConfiguration.java | 32 + .../java/jasper/config/IntegrationConfig.java | 93 + .../jasper/config/JacksonConfiguration.java | 95 + .../java/jasper/config/KubernetesConfig.java | 10 + .../jasper/config/LocaleConfiguration.java | 17 + .../config/LoggingAspectConfiguration.java | 19 + .../java/jasper/config/MetricsConfig.java | 67 + .../jasper/config/ObjectMapperConfig.java | 18 + .../jasper/config/OpenApiConfiguration.java | 34 + .../java/jasper/config/PostgreSQLDialect.java | 45 + .../src/main/java/jasper/config/Props.java | 434 ++ .../java/jasper/config/RateLimitConfig.java | 114 + .../main/java/jasper/config/RedisConfig.java | 529 ++ .../main/java/jasper/config/SQLiteConfig.java | 114 + .../java/jasper/config/SQLiteDialect.java | 208 + .../jasper/config/SecurityConfiguration.java | 220 + .../java/jasper/config/SingleNodeConfig.java | 126 + .../StaticResourcesWebConfiguration.java | 54 + .../java/jasper/config/WebConfigurer.java | 102 + .../java/jasper/config/WebSocketConfig.java | 303 + .../jasper/domain/AbstractAuditingEntity.java | 77 + .../src/main/java/jasper/domain/Ext.java | 76 + .../src/main/java/jasper/domain/External.java | 23 + .../src/main/java/jasper/domain/Metadata.java | 132 + .../src/main/java/jasper/domain/Plugin.java | 95 + .../src/main/java/jasper/domain/Ref.java | 264 + .../src/main/java/jasper/domain/RefId.java | 31 + .../src/main/java/jasper/domain/TagId.java | 32 + .../src/main/java/jasper/domain/Template.java | 92 + .../src/main/java/jasper/domain/User.java | 210 + .../main/java/jasper/domain/proj/Cursor.java | 7 + .../java/jasper/domain/proj/HasOrigin.java | 89 + .../main/java/jasper/domain/proj/HasTags.java | 76 + .../main/java/jasper/domain/proj/RefUrl.java | 13 + .../main/java/jasper/domain/proj/RefView.java | 19 + .../src/main/java/jasper/domain/proj/Tag.java | 154 + .../jasper/domain/validator/SchemaValid.java | 24 + .../domain/validator/SchemaValidator.java | 24 + .../jasper/errors/AlreadyExistsException.java | 11 + .../errors/DeactivateSelfException.java | 11 + .../DuplicateModifiedDateException.java | 11 + .../jasper/errors/DuplicateTagException.java | 14 + .../jasper/errors/FreshLoginException.java | 11 + .../jasper/errors/InvalidPatchException.java | 12 + .../jasper/errors/InvalidPluginException.java | 16 + .../errors/InvalidPluginUserUrlException.java | 14 + .../jasper/errors/InvalidPushException.java | 11 + .../errors/InvalidTemplateException.java | 16 + .../jasper/errors/InvalidTunnelException.java | 16 + .../errors/InvalidUserProfileException.java | 12 + .../jasper/errors/MaxSourcesException.java | 12 + .../java/jasper/errors/ModifiedException.java | 11 + .../jasper/errors/NotAvailableException.java | 8 + .../java/jasper/errors/NotFoundException.java | 11 + .../OperationForbiddenOnOriginException.java | 11 + .../jasper/errors/PublishDateException.java | 12 + .../jasper/errors/PullLocalException.java | 11 + .../errors/RetryableTunnelException.java | 16 + .../errors/ScrapeProtocolException.java | 12 + .../java/jasper/errors/ScriptException.java | 14 + .../java/jasper/errors/TooLargeException.java | 12 + .../errors/UntrustedScriptException.java | 17 + .../jasper/errors/UserTagInUseException.java | 11 + .../management/SecurityMetersService.java | 63 + .../src/main/java/jasper/plugin/Audio.java | 21 + .../src/main/java/jasper/plugin/Cache.java | 48 + .../src/main/java/jasper/plugin/Cron.java | 23 + .../src/main/java/jasper/plugin/Embed.java | 23 + .../src/main/java/jasper/plugin/Feed.java | 36 + .../src/main/java/jasper/plugin/Oembed.java | 30 + .../src/main/java/jasper/plugin/Origin.java | 27 + .../src/main/java/jasper/plugin/Pull.java | 55 + .../src/main/java/jasper/plugin/Push.java | 26 + .../src/main/java/jasper/plugin/Scrape.java | 30 + .../main/java/jasper/plugin/Thumbnail.java | 36 + .../src/main/java/jasper/plugin/Tunnel.java | 27 + .../src/main/java/jasper/plugin/Video.java | 21 + .../main/java/jasper/plugin/config/Index.java | 29 + .../java/jasper/plugin/config/Script.java | 25 + .../jasper/repository/BackfillRepository.java | 9 + .../BackfillRepositoryImplPostgres.java | 47 + .../BackfillRepositoryImplSqlite.java | 18 + .../java/jasper/repository/ExtRepository.java | 52 + .../jasper/repository/IndexRepository.java | 22 + .../IndexRepositoryImplPostgres.java | 86 + .../repository/IndexRepositoryImplSqlite.java | 87 + .../jasper/repository/ModifiedCursor.java | 10 + .../java/jasper/repository/OriginMixin.java | 14 + .../jasper/repository/PluginRepository.java | 65 + .../jasper/repository/QualifiedTagMixin.java | 16 + .../java/jasper/repository/RefRepository.java | 200 + .../repository/RefRepositoryCustom.java | 13 + .../repository/RefRepositoryImplPostgres.java | 65 + .../repository/RefRepositoryImplSqlite.java | 62 + .../java/jasper/repository/StreamMixin.java | 30 + .../jasper/repository/TemplateRepository.java | 93 + .../jasper/repository/UserRepository.java | 97 + .../java/jasper/repository/filter/Query.java | 20 + .../jasper/repository/filter/RefFilter.java | 158 + .../jasper/repository/filter/TagFilter.java | 81 + .../jasper/repository/filter/TagQuery.java | 103 + .../java/jasper/repository/spec/ExtSpec.java | 57 + .../jasper/repository/spec/OriginSpec.java | 54 + .../jasper/repository/spec/PluginSpec.java | 58 + .../jasper/repository/spec/QualifiedTag.java | 199 + .../java/jasper/repository/spec/RefSpec.java | 379 ++ .../repository/spec/ReplicationSpec.java | 28 + .../java/jasper/repository/spec/SortSpec.java | 147 + .../java/jasper/repository/spec/TagSpec.java | 127 + .../jasper/repository/spec/TemplateSpec.java | 58 + .../java/jasper/repository/spec/UserSpec.java | 63 + .../src/main/java/jasper/security/Auth.java | 1145 ++++ .../jasper/security/AuthoritiesConstants.java | 19 + .../main/java/jasper/security/HostCheck.java | 51 + .../java/jasper/security/SecurityUtils.java | 101 + .../security/SpringSecurityAuditorAware.java | 19 + .../security/jwt/AbstractTokenProvider.java | 81 + .../main/java/jasper/security/jwt/Claims.java | 43 + .../jasper/security/jwt/JWTConfigurer.java | 28 + .../java/jasper/security/jwt/JWTFilter.java | 88 + .../security/jwt/JwtAuthentication.java | 58 + .../jasper/security/jwt/TokenProvider.java | 8 + .../security/jwt/TokenProviderImpl.java | 267 + .../jwt/TokenProviderImplDefault.java | 45 + .../security/jwt/TokenProviderImplNop.java | 23 + .../java/jasper/service/BackupService.java | 151 + .../main/java/jasper/service/ExtService.java | 149 + .../java/jasper/service/GraphService.java | 40 + .../java/jasper/service/OembedService.java | 61 + .../java/jasper/service/OriginService.java | 99 + .../java/jasper/service/PluginService.java | 139 + .../java/jasper/service/ProfileService.java | 109 + .../java/jasper/service/ProxyService.java | 108 + .../main/java/jasper/service/RefService.java | 197 + .../java/jasper/service/ScrapeService.java | 42 + .../main/java/jasper/service/SmtpService.java | 142 + .../java/jasper/service/TaggingService.java | 171 + .../java/jasper/service/TemplateService.java | 138 + .../main/java/jasper/service/UserService.java | 210 + .../java/jasper/service/dto/BackupDto.java | 19 + .../jasper/service/dto/BackupOptionsDto.java | 26 + .../java/jasper/service/dto/DtoMapper.java | 118 + .../main/java/jasper/service/dto/ExtDto.java | 23 + .../java/jasper/service/dto/ExternalDto.java | 17 + .../java/jasper/service/dto/MetadataDto.java | 24 + .../java/jasper/service/dto/PluginDto.java | 27 + .../java/jasper/service/dto/ProfileDto.java | 22 + .../main/java/jasper/service/dto/RefDto.java | 31 + .../java/jasper/service/dto/RefNodeDto.java | 32 + .../java/jasper/service/dto/RefReplDto.java | 30 + .../java/jasper/service/dto/RolesDto.java | 19 + .../jasper/service/dto/SmtpWebhookDto.java | 73 + .../java/jasper/service/dto/TemplateDto.java | 26 + .../main/java/jasper/service/dto/UserDto.java | 30 + .../src/main/java/jasper/util/Crypto.java | 46 + .../main/java/jasper/util/DbConstraint.java | 55 + .../util/JsonArrayStreamDataSupplier.java | 99 + .../src/main/java/jasper/util/Logging.java | 10 + .../jasper/web/rest/BackupController.java | 184 + .../java/jasper/web/rest/ExtController.java | 184 + .../java/jasper/web/rest/GraphController.java | 62 + .../jasper/web/rest/OEmbedController.java | 53 + .../jasper/web/rest/OriginController.java | 62 + .../jasper/web/rest/PluginController.java | 157 + .../jasper/web/rest/ProfileController.java | 140 + .../java/jasper/web/rest/ProxyController.java | 214 + .../java/jasper/web/rest/RefController.java | 292 + .../jasper/web/rest/ReplicateController.java | 467 ++ .../jasper/web/rest/ScrapeController.java | 61 + .../jasper/web/rest/TaggingController.java | 173 + .../jasper/web/rest/TemplateController.java | 157 + .../java/jasper/web/rest/UserController.java | 184 + .../jasper/web/rest/WebhookController.java | 50 + .../rest/errors/BadRequestAlertException.java | 42 + .../web/rest/errors/ErrorConstants.java | 14 + .../web/rest/errors/ExceptionTranslator.java | 257 + .../jasper/web/rest/errors/FieldErrorVM.java | 32 + .../rest/errors/ProblemDetailWithCause.java | 118 + .../rest/jasper/src/main/resources/banner.txt | 10 + .../resources/config/application-dblog.yml | 12 + .../resources/config/application-debug.yml | 16 + .../main/resources/config/application-dev.yml | 97 + .../resources/config/application-prod.yml | 92 + .../resources/config/application-sqlite.yml | 27 + .../main/resources/config/application-ssl.yml | 7 + .../main/resources/config/application-tls.yml | 19 + .../src/main/resources/config/application.yml | 238 + .../00000000000000_initial_schema.xml | 163 + .../00000000000001_sqlite_schema.xml | 149 + .../resources/config/liquibase/master.xml | 27 + .../main/resources/config/tls/keystore.p12 | Bin 0 -> 2721 bytes .../main/resources/i18n/messages.properties | 6 + .../resources/i18n/messages_en.properties | 6 + .../jasper/src/main/resources/keystore.p12 | Bin 0 -> 2652 bytes .../jasper/src/main/resources/providers.json | 5431 +++++++++++++++++ .../jasper/src/main/resources/swagger/api.yml | 3027 +++++++++ .../test/java/jasper/DisabledOnSqlite.java | 14 + .../src/test/java/jasper/IntegrationTest.java | 14 + .../jasper/MultiTenantIntegrationTest.java | 19 + .../java/jasper/TechnicalStructureTest.java | 53 + .../jasper/component/BackupRestoreIT.java | 487 ++ .../java/jasper/component/ConfigCacheIT.java | 315 + .../java/jasper/component/IngestExtIT.java | 232 + .../test/java/jasper/component/IngestIT.java | 561 ++ .../java/jasper/component/IngestPluginIT.java | 232 + .../jasper/component/IngestTemplateIT.java | 232 + .../java/jasper/component/IngestUserIT.java | 232 + .../test/java/jasper/component/MetaIT.java | 289 + .../java/jasper/component/ScriptRunnerIT.java | 396 ++ .../test/java/jasper/component/TaggerIT.java | 179 + .../java/jasper/component/ValidateExtIT.java | 340 ++ .../jasper/component/ValidateExtTest.java | 142 + .../java/jasper/component/ValidateRefIT.java | 457 ++ .../jasper/component/ValidateRefTest.java | 218 + .../jasper/component/channel/StompTest.java | 97 + .../java/jasper/component/cron/ScriptIT.java | 184 + .../jasper/component/delta/DeltaScriptIT.java | 184 + .../component/script/RssParserTest.java | 218 + .../jasper/component/vm/JavaScriptTest.java | 98 + .../java/jasper/component/vm/PythonTest.java | 116 + .../java/jasper/component/vm/ShellTest.java | 98 + .../jasper/config/AsyncConfigurationTest.java | 68 + .../test/java/jasper/config/ConfigTest.java | 282 + ...ernetesDiscoveryAutoConfigurationTest.java | 23 + .../LiquibasePropertiesBindingTest.java | 39 + .../StaticResourcesWebConfigurerTest.java | 45 + .../java/jasper/config/WebConfigurerTest.java | 154 + .../config/WebConfigurerTestController.java | 14 + .../config/timezone/HibernateTimeZoneIT.java | 168 + .../java/jasper/domain/RefValidationTest.java | 150 + .../src/test/java/jasper/domain/UserTest.java | 399 ++ .../SecurityMetersServiceTests.java | 85 + .../repository/BackfillRepositoryIT.java | 129 + .../jasper/repository/IndexRepositoryIT.java | 40 + .../jasper/repository/RefRepositoryIT.java | 457 ++ .../repository/UserRepositoryCustomIT.java | 89 + .../repository/UserRepositoryMergeIT.java | 323 + .../repository/timezone/DateTimeWrapper.java | 134 + .../timezone/DateTimeWrapperRepository.java | 10 + .../security/AuthMultiTenantUnitTest.java | 1202 ++++ .../java/jasper/security/AuthUnitTest.java | 1164 ++++ .../security/SecurityUtilsUnitTest.java | 100 + .../jasper/security/jwt/JWTFilterTest.java | 161 + .../security/jwt/TokenProviderImplTest.java | 427 ++ .../jwt/TokenProviderSecurityMetersTests.java | 174 + .../java/jasper/service/ExtServiceIT.java | 708 +++ .../java/jasper/service/ExtServiceMTIT.java | 715 +++ .../java/jasper/service/PluginServiceIT.java | 169 + .../java/jasper/service/RefServiceIT.java | 1732 ++++++ .../java/jasper/service/RefServiceMTIT.java | 1469 +++++ .../java/jasper/service/TaggingServiceIT.java | 361 ++ .../jasper/service/TemplateServiceIT.java | 160 + .../java/jasper/service/UserServiceIT.java | 1042 ++++ .../java/jasper/web/rest/ExtControllerIT.java | 105 + .../jasper/web/rest/PluginControllerIT.java | 129 + .../jasper/web/rest/ProxyControllerIT.java | 316 + .../java/jasper/web/rest/RefControllerIT.java | 281 + .../jasper/web/rest/TaggingControllerIT.java | 359 ++ .../jasper/web/rest/TemplateControllerIT.java | 98 + .../jasper/web/rest/UserControllerIT.java | 101 + .../rest/errors/ExceptionTranslatorIT.java | 115 + .../ExceptionTranslatorTestController.java | 66 + .../resources/config/application-sqlite.yml | 26 + .../src/test/resources/config/application.yml | 113 + .../test/resources/junit-platform.properties | 3 + .../jasper/src/test/resources/providers.json | 18 + jdk_25_maven/cs/rest/pom.xml | 18 + jdk_25_maven/em/embedded/pom.xml | 18 + jdk_25_maven/em/embedded/rest/jasper/pom.xml | 105 + .../jasper/EmbeddedEvoMasterController.java | 163 + jdk_25_maven/em/embedded/rest/pom.xml | 18 + jdk_25_maven/em/external/pom.xml | 18 + jdk_25_maven/em/external/rest/jasper/pom.xml | 75 + .../jasper/ExternalEvoMasterController.java | 183 + jdk_25_maven/em/external/rest/pom.xml | 18 + jdk_25_maven/em/pom.xml | 88 + jdk_25_maven/pom.xml | 67 + scripts/dist.py | 14 + statistics/data.csv | 1 + 374 files changed, 56895 insertions(+) create mode 100644 jdk_25_maven/cs/pom.xml create mode 100644 jdk_25_maven/cs/rest/jasper/.dockerignore create mode 100644 jdk_25_maven/cs/rest/jasper/.editorconfig create mode 100644 jdk_25_maven/cs/rest/jasper/.gitattributes create mode 100644 jdk_25_maven/cs/rest/jasper/.m2/settings.xml create mode 100644 jdk_25_maven/cs/rest/jasper/LICENSE create mode 100644 jdk_25_maven/cs/rest/jasper/README.md create mode 100644 jdk_25_maven/cs/rest/jasper/pom.xml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/JasperApplication.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/ClearIdle.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/IdleAspect.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/logging/LoggingAspect.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/client/JasperClient.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/client/OembedClient.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/client/ScimClient.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/client/TokenClient.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/client/dto/JasperMapper.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/AccessToken.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Backup.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/ConfigCache.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Fetch.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/FetchImplCache.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/FetchImplHttp.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/FileCache.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/HttpCache.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/HttpClientFactory.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Images.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Ingest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/IngestBundle.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/IngestExt.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/IngestPlugin.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/IngestTemplate.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/IngestUser.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Messages.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Meta.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/OembedProviders.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Preload.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/ProfileManager.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/ProfileManagerScim.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Proxy.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Replicator.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Rng.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Sanitizer.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Scraper.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/ScriptExecutorFactory.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/ScriptRunner.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Storage.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/StorageImplLocal.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Tagger.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/TunnelClient.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/Validate.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/channel/ClearConfigCache.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/channel/Index.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/channel/Pull.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/channel/Push.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/channel/Stomp.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/channel/TunnelServer.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/channel/TunnelServerImplFile.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/channel/TunnelServerImplK8s.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/channel/Watch.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/cron/Backfill.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/cron/Cron.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/cron/ExpireScriptDeps.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/cron/Pull.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/cron/Push.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/cron/Recycler.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/cron/Script.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/delta/Async.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/delta/DeltaScript.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/delta/Mail.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/dto/AuthTokenResponse.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/dto/Bundle.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/dto/ComponentDtoMapper.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/dto/JsonLd.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/dto/MetadataUpdateDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/dto/RefUpdateDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/dto/ScimPatchOp.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/dto/ScimUserResource.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/script/DeltaCache.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/script/DeltaScrape.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/script/RssParser.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/script/ScriptDefaults.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/vm/JavaScript.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/vm/Python.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/vm/RunProcess.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/component/vm/Shell.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/AsyncConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/AuthConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/BulkheadConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/CacheConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/Config.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/Constants.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/DatabaseConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/DateTimeFormatConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/FeignConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/IntegrationConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/JacksonConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/KubernetesConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/LocaleConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/LoggingAspectConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/MetricsConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/ObjectMapperConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/OpenApiConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/PostgreSQLDialect.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/Props.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/RateLimitConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/RedisConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/SQLiteConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/SQLiteDialect.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/SecurityConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/SingleNodeConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/StaticResourcesWebConfiguration.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/WebConfigurer.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/config/WebSocketConfig.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/AbstractAuditingEntity.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/Ext.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/External.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/Metadata.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/Plugin.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/Ref.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/RefId.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/TagId.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/Template.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/User.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/proj/Cursor.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/proj/HasOrigin.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/proj/HasTags.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/proj/RefUrl.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/proj/RefView.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/proj/Tag.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/validator/SchemaValid.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/domain/validator/SchemaValidator.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/AlreadyExistsException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/DeactivateSelfException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/DuplicateModifiedDateException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/DuplicateTagException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/FreshLoginException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/InvalidPatchException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/InvalidPluginException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/InvalidPluginUserUrlException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/InvalidPushException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/InvalidTemplateException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/InvalidTunnelException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/InvalidUserProfileException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/MaxSourcesException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/ModifiedException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/NotAvailableException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/NotFoundException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/OperationForbiddenOnOriginException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/PublishDateException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/PullLocalException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/RetryableTunnelException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/ScrapeProtocolException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/ScriptException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/TooLargeException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/UntrustedScriptException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/errors/UserTagInUseException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/management/SecurityMetersService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Audio.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Cache.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Cron.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Embed.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Feed.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Oembed.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Origin.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Pull.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Push.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Scrape.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Thumbnail.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Tunnel.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/Video.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/config/Index.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/plugin/config/Script.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/BackfillRepository.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/BackfillRepositoryImplPostgres.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/BackfillRepositoryImplSqlite.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/ExtRepository.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/IndexRepository.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/IndexRepositoryImplPostgres.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/IndexRepositoryImplSqlite.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/ModifiedCursor.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/OriginMixin.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/PluginRepository.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/QualifiedTagMixin.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/RefRepository.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/RefRepositoryCustom.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/RefRepositoryImplPostgres.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/RefRepositoryImplSqlite.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/StreamMixin.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/TemplateRepository.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/UserRepository.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/filter/Query.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/filter/RefFilter.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/filter/TagFilter.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/filter/TagQuery.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/spec/ExtSpec.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/spec/OriginSpec.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/spec/PluginSpec.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/spec/QualifiedTag.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/spec/RefSpec.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/spec/ReplicationSpec.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/spec/SortSpec.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/spec/TagSpec.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/spec/TemplateSpec.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/repository/spec/UserSpec.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/Auth.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/AuthoritiesConstants.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/HostCheck.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/SecurityUtils.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/SpringSecurityAuditorAware.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/jwt/AbstractTokenProvider.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/jwt/Claims.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/jwt/JWTConfigurer.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/jwt/JWTFilter.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/jwt/JwtAuthentication.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/jwt/TokenProvider.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/jwt/TokenProviderImpl.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/jwt/TokenProviderImplDefault.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/security/jwt/TokenProviderImplNop.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/BackupService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/ExtService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/GraphService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/OembedService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/OriginService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/PluginService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/ProfileService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/ProxyService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/RefService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/ScrapeService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/SmtpService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/TaggingService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/TemplateService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/UserService.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/BackupDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/BackupOptionsDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/DtoMapper.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/ExtDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/ExternalDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/MetadataDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/PluginDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/ProfileDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/RefDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/RefNodeDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/RefReplDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/RolesDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/SmtpWebhookDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/TemplateDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/service/dto/UserDto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/util/Crypto.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/util/DbConstraint.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/util/JsonArrayStreamDataSupplier.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/util/Logging.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/BackupController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/ExtController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/GraphController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/OEmbedController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/OriginController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/PluginController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/ProfileController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/ProxyController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/RefController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/ReplicateController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/ScrapeController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/TaggingController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/TemplateController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/UserController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/WebhookController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/errors/BadRequestAlertException.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/errors/ErrorConstants.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/errors/ExceptionTranslator.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/errors/FieldErrorVM.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/java/jasper/web/rest/errors/ProblemDetailWithCause.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/banner.txt create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/application-dblog.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/application-debug.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/application-dev.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/application-prod.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/application-sqlite.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/application-ssl.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/application-tls.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/application.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/liquibase/changelog/00000000000001_sqlite_schema.xml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/liquibase/master.xml create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/config/tls/keystore.p12 create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/i18n/messages.properties create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/i18n/messages_en.properties create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/keystore.p12 create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/providers.json create mode 100644 jdk_25_maven/cs/rest/jasper/src/main/resources/swagger/api.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/DisabledOnSqlite.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/IntegrationTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/MultiTenantIntegrationTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/TechnicalStructureTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/BackupRestoreIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/ConfigCacheIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/IngestExtIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/IngestIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/IngestPluginIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/IngestTemplateIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/IngestUserIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/MetaIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/ScriptRunnerIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/TaggerIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/ValidateExtIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/ValidateExtTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/ValidateRefIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/ValidateRefTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/channel/StompTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/cron/ScriptIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/delta/DeltaScriptIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/script/RssParserTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/vm/JavaScriptTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/vm/PythonTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/component/vm/ShellTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/config/AsyncConfigurationTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/config/ConfigTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/config/JasperApplicationKubernetesDiscoveryAutoConfigurationTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/config/LiquibasePropertiesBindingTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/config/StaticResourcesWebConfigurerTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/config/WebConfigurerTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/config/WebConfigurerTestController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/config/timezone/HibernateTimeZoneIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/domain/RefValidationTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/domain/UserTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/management/SecurityMetersServiceTests.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/repository/BackfillRepositoryIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/repository/IndexRepositoryIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/repository/RefRepositoryIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/repository/UserRepositoryCustomIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/repository/UserRepositoryMergeIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/repository/timezone/DateTimeWrapper.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/repository/timezone/DateTimeWrapperRepository.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/security/AuthMultiTenantUnitTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/security/AuthUnitTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/security/SecurityUtilsUnitTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/security/jwt/JWTFilterTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/security/jwt/TokenProviderImplTest.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/security/jwt/TokenProviderSecurityMetersTests.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/service/ExtServiceIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/service/ExtServiceMTIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/service/PluginServiceIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/service/RefServiceIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/service/RefServiceMTIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/service/TaggingServiceIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/service/TemplateServiceIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/service/UserServiceIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/web/rest/ExtControllerIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/web/rest/PluginControllerIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/web/rest/ProxyControllerIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/web/rest/RefControllerIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/web/rest/TaggingControllerIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/web/rest/TemplateControllerIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/web/rest/UserControllerIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/web/rest/errors/ExceptionTranslatorIT.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/java/jasper/web/rest/errors/ExceptionTranslatorTestController.java create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/resources/config/application-sqlite.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/resources/config/application.yml create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/resources/junit-platform.properties create mode 100644 jdk_25_maven/cs/rest/jasper/src/test/resources/providers.json create mode 100644 jdk_25_maven/cs/rest/pom.xml create mode 100644 jdk_25_maven/em/embedded/pom.xml create mode 100644 jdk_25_maven/em/embedded/rest/jasper/pom.xml create mode 100644 jdk_25_maven/em/embedded/rest/jasper/src/main/java/em/embedded/jasper/EmbeddedEvoMasterController.java create mode 100644 jdk_25_maven/em/embedded/rest/pom.xml create mode 100644 jdk_25_maven/em/external/pom.xml create mode 100644 jdk_25_maven/em/external/rest/jasper/pom.xml create mode 100644 jdk_25_maven/em/external/rest/jasper/src/main/java/em/external/jasper/ExternalEvoMasterController.java create mode 100644 jdk_25_maven/em/external/rest/pom.xml create mode 100644 jdk_25_maven/em/pom.xml create mode 100644 jdk_25_maven/pom.xml diff --git a/README.md b/README.md index b889de715..a5772eebc 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,8 @@ Auth configuration files can found in the [auth](auth) folder. * **HTTP Patch Spring** (MIT), [jdk_11_maven/cs/rest/http-patch-spring](jdk_11_maven/cs/rest/http-patch-spring), from [https://github.com/cassiomolin/http-patch-spring](https://github.com/cassiomolin/http-patch-spring) +* **Jasper** (MIT), [jdk_25_maven/cs/rest/jasper](jdk_25_maven/cs/rest/jasper), from [https://github.com/cjmalloy/jasper](https://github.com/cjmalloy/jasper) + * **Languagetool** (LGPL), [jdk_8_maven/cs/rest/original/languagetool](jdk_8_maven/cs/rest/original/languagetool), from [https://github.com/languagetool-org/languagetool](https://github.com/languagetool-org/languagetool) * **Market** (MIT), [jdk_11_maven/cs/rest-gui/market](jdk_11_maven/cs/rest-gui/market), from [https://github.com/aleksey-lukyanets/market](https://github.com/aleksey-lukyanets/market) diff --git a/jdk_25_maven/cs/pom.xml b/jdk_25_maven/cs/pom.xml new file mode 100644 index 000000000..4d7e28e5b --- /dev/null +++ b/jdk_25_maven/cs/pom.xml @@ -0,0 +1,18 @@ + + 4.0.0 + + + org.evomaster + evomaster-benchmark-jdk25 + 4.3.0 + + + evomaster-benchmark-jdk25-cs + pom + + + rest + + + diff --git a/jdk_25_maven/cs/rest/jasper/.dockerignore b/jdk_25_maven/cs/rest/jasper/.dockerignore new file mode 100644 index 000000000..827673668 --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/.dockerignore @@ -0,0 +1,32 @@ +# Development artifacts +target/ +.github/ +.mvn/ +docs/ +.idea/ +storage/ +gatling/ +repl/ +.DS_Store + +# Documentation +_includes/ +docs/ +*.md +LICENSE + +# Git and config files not needed for build +.git/ +.gitignore +.gitattributes +.editorconfig + +# Build scripts not used in Docker (image has its own Maven) +mvnw +mvnw.cmd +Dockerfile + +# Scripts and local dev files +docker-compose.yaml +.dockerignore +_config.yml diff --git a/jdk_25_maven/cs/rest/jasper/.editorconfig b/jdk_25_maven/cs/rest/jasper/.editorconfig new file mode 100644 index 000000000..2f73c929a --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/.editorconfig @@ -0,0 +1,20 @@ + +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = tab +indent_size = 2 + +[*.{java,xml,json}] +indent_size = 4 + +[*.{md,yml,yaml,json}] +indent_style = space +trim_trailing_whitespace = false + +[CODEOWNERS] +indent_size = 8 diff --git a/jdk_25_maven/cs/rest/jasper/.gitattributes b/jdk_25_maven/cs/rest/jasper/.gitattributes new file mode 100644 index 000000000..ca61722de --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/.gitattributes @@ -0,0 +1,150 @@ +# This file is inspired by https://github.com/alexkaratarakis/gitattributes +# +# Auto detect text files and perform LF normalization +# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +* text=auto + +# The above will handle all files NOT found below +# These files are text and should be normalized (Convert crlf => lf) + +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf +*.coffee text +*.css text +*.cql text +*.df text +*.ejs text +*.html text +*.java text +*.js text +*.json text +*.less text +*.properties text +*.sass text +*.scss text +*.sh text eol=lf +*.sql text +*.txt text +*.ts text +*.xml text +*.yaml text +*.yml text + +# Documents +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.markdown text +*.md text +*.adoc text +*.textile text +*.mustache text +*.csv text +*.tab text +*.tsv text +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +copyright text +*COPYRIGHT* text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as an asset (binary) by default. If you want to treat it as text, +# comment-out the following line and uncomment the line after. +*.svg binary +#*.svg text +*.eps binary + +# These files are binary and should be left untouched +# (binary is a macro for -text -diff) +*.class binary +*.jar binary +*.war binary + +## LINTERS +.csslintrc text +.eslintrc text +.jscsrc text +.jshintrc text +.jshintignore text +.stylelintrc text + +## CONFIGS +*.conf text +*.config text +.editorconfig text +.gitattributes text +.gitconfig text +.gitignore text +.htaccess text +*.npmignore text + +## HEROKU +Procfile text +.slugignore text + +## AUDIO +*.kar binary +*.m4a binary +*.mid binary +*.midi binary +*.mp3 binary +*.ogg binary +*.ra binary + +## VIDEO +*.3gpp binary +*.3gp binary +*.as binary +*.asf binary +*.asx binary +*.fla binary +*.flv binary +*.m4v binary +*.mng binary +*.mov binary +*.mp4 binary +*.mpeg binary +*.mpg binary +*.swc binary +*.swf binary +*.webm binary + +## ARCHIVES +*.7z binary +*.gz binary +*.rar binary +*.tar binary +*.zip binary + +## FONTS +*.ttf binary +*.eot binary +*.otf binary +*.woff binary +*.woff2 binary diff --git a/jdk_25_maven/cs/rest/jasper/.m2/settings.xml b/jdk_25_maven/cs/rest/jasper/.m2/settings.xml new file mode 100644 index 000000000..40c91efda --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/.m2/settings.xml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/jdk_25_maven/cs/rest/jasper/LICENSE b/jdk_25_maven/cs/rest/jasper/LICENSE new file mode 100644 index 000000000..2c5b3f597 --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Chris Malloy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/jdk_25_maven/cs/rest/jasper/README.md b/jdk_25_maven/cs/rest/jasper/README.md new file mode 100644 index 000000000..9997afb44 --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/README.md @@ -0,0 +1,1032 @@ +# Jasper +Knowledge Management Server + +[![Build & Test](https://github.com/cjmalloy/jasper/actions/workflows/test.yml/badge.svg)](https://cjmalloy.github.io/jasper/reports/latest-junit/) +[![Coverage](https://img.shields.io/endpoint?url=https://cjmalloy.github.io/jasper/reports/latest-junit/coverage-badge.json)](https://cjmalloy.github.io/jasper/reports/latest-junit/coverage/) +[![Gatling](https://github.com/cjmalloy/jasper/actions/workflows/gatling.yml/badge.svg)](https://cjmalloy.github.io/jasper/reports/latest-gatling/) +[![Dependabot](https://img.shields.io/endpoint?url=https://cjmalloy.github.io/jasper/reports/dependabot-badge.json)](https://github.com/cjmalloy/jasper/security/dependabot) +[![OpenAPI](https://img.shields.io/badge/OpenAPI-1.3.6-brightgreen)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/cjmalloy/jasper/refs/heads/master/src/main/resources/swagger/api.yml) +[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/jasper)](https://artifacthub.io/packages/helm/jasper/jasper) + +## Quickstart +To start the server, client, and database with a single admin user, run +the [quickstart](https://github.com/cjmalloy/jasper-ui/blob/master/quickstart/docker-compose.yaml) +docker compose file. See [Jasper App](https://github.com/cjmalloy/jasper-app) for an installable +electron wrapper. + +See [Jasper-UI](https://github.com/cjmalloy/jasper-ui) for documentation on the reference client. + +## Knowledge Management +Jasper is an open source knowledge management system. It provides a generic set of tools for dealing +with knowledge management style problems. Knowledge management type problems include: +* Business Intelligence +* Scientific Research +* Journalism +* Web Forums +* Wiki (Encyclopedia) +* Task Management +* Libraries +* Customer Support +* Collaborative Writing +* Personal Knowledge Management +* E-mail + +Jasper can be configured to host all these products, individually or in combination. +Run it as an app or a website and connect them together to build a networked system. +Prevent data loss by having full or partial replication of data across the network. +Safely ingest external data sources with one-way replication. +Enforce conformity with a flexible data model, or simply collate unstructured reports. + +### Security +Jasper uses Tag Based Access Control (TBAC) to assign fine grained access controls to any object in the +system. This system is simple and powerful, such that the entire security specification is contained +in a [small, readable file](https://github.com/cjmalloy/jasper/blob/master/src/main/java/jasper/security/Auth.java). + +### Build your own client +Connect to Jasper with a custom client to give users a streamlined user experience. Frontend +developers can create a bespoke interface without needing to make any server side changes. Create custom +plugins and templates and ensure data shape with [JTD](https://jsontypedef.com/docs/jtd-in-5-minutes/) +schemas. Fork [the reference client](https://github.com/cjmalloy/jasper-ui) or use the +[OpenApi docs](https://editor.swagger.io/?url=https://raw.githubusercontent.com/cjmalloy/jasper/refs/heads/master/src/main/resources/swagger/api.yml) to generate API stubs. + +## Standards +Jasper is a standard data model and API. While JSON is used in this document, Jasper may be generalised +to other presentations, such as XML, YAML, or TOML. +Jasper defines five entity types, an access control model, and a plugin/templating system for extending +the model. +1. Ref +2. Ext +3. User +4. Plugin +5. Template + +The main entity is the Ref, it represents a reference to an external resource. The main field in a Ref +is the URL field which can be a link to a web page, or a reference to any arbitrary resources predicated +by the URL scheme. Web content will of course use the http or https scheme. To reference a book, +one could use the [ISBN](https://en.wikipedia.org/wiki/ISBN) scheme (i.e. `isbn:978-3-16-148410-0`). +For comments, [Jasper-UI](https://github.com/cjmalloy/jasper-ui) uses a `comment` scheme followed by an arbitrary ID, usually a UUID +(i.e. `comment:75b36465-4236-4d64-8c78-027d87f3c072`). For hosting internal wikis, +[Jasper-UI](https://github.com/cjmalloy/jasper-ui) uses a `wiki` scheme followed by the +[Wiki Page Name](https://en.wikipedia.org/wiki/Wikipedia:Page_name) (i.e. `wiki:John_Cena`). + +Like the [OSI model](https://en.wikipedia.org/wiki/OSI_model), Jasper's data model is defined in layers: +1. **Identity Layer** - persistence of individual entities +2. **Indexing Layer** - query and transport of entities +3. **Application Layer** - custom modifications + +## Tagging +Jasper support hierarchical tagging of Refs. Tags are not entities, they are strings with +regex `[_+]?[a-z0-9]+([./][a-z0-9]+)*`. Tags are part of the primary key for Tag-like entities, but no +entities need exist to use a tag. +Refs have a list of tags which can be used for categorization, permissions, and plugins. +There are three types of tags, which the type defined as a semantic ontology: +`public`, `+protected`, `_private` tags. The character prefix defines the type while also being +part of the tag itself. Therefore, no lookup is ever required to determine the tag type. + * A public tag can be used freely by anyone. This includes tagging a Ref, or using it in a query. + * A protected tag can freely be used in a query, but you cannot tag a Ref with a protected tag +unless it is in your [read access](#access-control) list. + * A private tag cannot be used at all unless permission is given. When fetching a Ref that includes +private tags, they will be removed by the server prior to sending. See +[access control](#access-control) for more. + +Tags may also be fully qualified by appending the origin. (i.e. `tag@origin`). +Use forward slashes to define hierarchical tags (i.e. `people/murray/bill` or `people/murray/anne`) + +## Querying +When fetching a page or Refs a query may be specified. The query language uses simple set-like +operators to match Refs according to their tag list and Origin. You may use tags, origins, or +fully qualified tags (tag + origin). There is a special origin `@` which will match the +default origin `""` (the empty string). +If a tag is not fully qualified it will match the wildcard origin `"@*"`. The `*` +wild card can be used to match anything on the default origin `""` (empty string). +Valid operators in a query are: +1. `:` and +2. `|` or +3. `!` not +4. `()` groups + +Note: In the current implementation, groups may not be nested. + +Example queries: + * `science`: All Refs that include the `science` tag + * `science|funny`: All Refs that have either the `science` tag or the `funny` tag + * `science:funny`: All Refs that have both the `science` tag and the `funny` tag + * `science:!funny`: All Refs that have the `science` tag but do not have the `funny` tag + * `(science|math):funny`: All Refs that have either the `science` or `math` tags, but +also the `funny` tag. This would match a ref with `['science', 'funny']`, `['math', 'funny']`, +but would not match `['science', 'math']` + * `science:funny|math:funny`: Extended form of previous query. Would produce the exact same results. + * `music:people/murray`: All Refs that have the `music` tag and `people/murray` tag. It would also +match Refs with `['music', 'people/murray/anne']` or `['music', 'people/murray/bill']` + +## Sorting +Jasper supports dynamic sorting on fields using arrow notation (`->`). This allows sorting by +any field within the `plugins`, `metadata`, `config`, or `external` JSONB columns without requiring +database schema changes. + +**Sort Syntax:** +- Use `->` as the path separator to navigate fields +- Append `:num` suffix for numeric sorting (otherwise values sort as strings) +- Append `:len` suffix to sort by array length, origin nesting level, or tag levels +- Use `[index]` notation for array element access (e.g., `external->ids[0]`) + +The `:num` and `:len` suffixes are automatically applied to metadata fields, so you can use +`metadata->responses` instead of `metadata->responses:len`. + +## Modding +Jasper allows extensive modification with server reuse. Since changes are done by creating +Plugin and Template entities, server restarts are not required. +This method of modding means that only client changes are required. The same Jasper server, +without any code modifications, can be used. The client can define and support its own Plugins +and Templates. This allows for much more flexible development, as writing client code (in particular +web clients) is much easier than writing server code. A developer with only front-end expertise +can extend the Jasper model to support arbitrary applications. +In order to extend the functionality of a Ref, a developer may choose a set of tags or URL scheme +and a convention by which they modify the semantics of a Ref. If a custom data model is also +required, a Plugin entity may be created which defines a +[JTD](https://jsontypedef.com/docs/jtd-in-5-minutes/) schema. A Plugin is a Tag-like entity. When +a Ref is tagged with a Plugin, the Plugin may be considered active for that Ref. The Ref may then +store data in its config field and the server will validate it according to the schema. +Similarly, Ext entities may be created which extend the functionality of a tag. As Plugins define +custom data that can be stored in a ref, Templates may be created which allow custom data to be +stored in Ext entities and similarly validated according to their schema. + +See [Jasper-UI](https://github.com/cjmalloy/jasper-ui) for examples of Plugins and Templates, such as: +* `plugin/thumbnail`: [This plugin](https://github.com/cjmalloy/jasper-ui/blob/master/src/app/mods/thumbnail.ts) +allows a Ref to include a URL to a thumbnail image. +* `user` Template: +[This template](https://github.com/cjmalloy/jasper-ui/blob/master/src/app/mods/user.ts) +allows a user tag to customize their experience, such as subscribing to a list of tags to show +on their home page. + +## Entities +There are two types of entities in Jasper: +1. Refs +2. Tags (including Exts, Plugins, Templates, and Users) + +![entities](./docs/entities.png) +Origins are used to facilitate replication and multi-tenant operation. Each origin represents a +jasper instance that that entity originated from. +![origins](./docs/origins.png) + +### Ref +Refs are the main data model in Jasper. A Ref defines a URL to a remote resource. Example: +```json +{ + "url": "https://www.youtube.com/watch?v=9Gn4rmQTZek", + "origin": "", + "title": "Why does Science News Suck So Much?", + "comment": "Sabine Hossenfelder", + "tags": ["public", "youtube", "sabine"], + "sources": [], + "alternateUrls": [], + "plugins": { + "plugin/thumbnail": {"url": "https://...jpg"} + }, + "metadata": { + "responses": 0, + "internalResponses": 0, + "plugins": {}, + "modified": "2022-06-18T12:07:04.404272Z" + }, + "published": "2022-06-18T12:00:07Z", + "created": "2022-06-18T12:07:04.404272Z", + "modified": "2022-06-18T12:07:04.404272Z" +} +``` +Only the "url" field is required. + +The combination of URL and Origin for a Ref must be unique and may be used as a Primary Composite Key. +Implementations may also make the modified date part of the composite primary key for version history. + +**URL:** The url of the resource. +**Origin:** The Origin this Ref was replicated from, or the empty string for local. +**Title:** Optional title for this Ref. +**Comment:** Optional comment for this Ref, usually markdown. +**Tags:** A list of tags used to categorise this Ref. All tags must match the regex `[_+]?[a-z0-9]+([./][a-z0-9]+)*` +**Sources:** A list of URLs which are sources for this Ref. These may or may not have a corresponding Ref +entity. If a source URL does correspond to a Ref, the published date of the source must predate the +published date of this Ref. +**Alternate URLs:** Alternate URLs which should be considered synonymous with the URL of this Ref. This +should be used as part of a uniqueness check when ingesting Refs. +**Plugins:** A JSON object with plugin tags as fields and arbitrary JSON data defined by each respective +plugin. Must be valid according to each plugin's schema. +**Metadata:** Optional data generated by the server for this resource. Includes response links (inverse +source lookup). +**Published:** The published date of this resource. Default to create date if not known. This date must +be later than the published date of all sources. +**Created:** Created date of this Ref. +**Modified:** Last modified date of this Ref. If this is the same as the created date no modification +has occurred. Does not update if Metadata is modified. + +### Ext +An Ext is a Tag-like entity representing a Tag extension. +```json +{ + "tag": "news", + "origin": "", + "name": "News", + "config": { + "pinned":[], + "sidebar": "" + }, + "modified": "2022-06-18T16:00:59.978700Z" +} +``` +Only the "tag" field is required. + +An Ext allows you to customise a Tag page. For example, you could set the sidebar text or pin some links. + +The combination of Tag and Origin for a Ext must be unique and may be used as a Primary Composite Key. +Implementations may also make the modified date part of the composite primary key for version history. + +**Tag:** The tag of this Ext. Must match the regex `[_+]?[a-z0-9]+([./][a-z0-9]+)*` +**Origin:** The Origin this Ext was replicated from, or the empty string for local. +**Name:** The display name of this Ext. Used to customise the page title for the Tag page. +**Config:** Arbitrary JSON data defined by Templates. Must be valid according to each template's schema. +**Modified:** Last modified date of this Ext + +### User +A User is a Tag-like entity representing a user. + +```json +{ + "tag": "+user/charlie", + "origin": "", + "name": "Charlie Brown", + "readAccess": [], + "writeAccess": [], + "tagReadAccess": [], + "tagWriteAccess": [], + "pubKey": "...", + "external": { + "ids": [] + }, + "modified": "2022-06-18T16:00:59.978700Z" +} +``` +Only the "tag" field is required. + +A User contains the access control information for the system. Access tags work in all +sub-origins. + +The combination of Tag and Origin for a User must be unique and may be used as a Primary Composite Key. +Implementations may also make the modified date part of the composite primary key for version history. + +**Tag:** The tag of this User. Must match the regex `[_+]user/[a-z0-9]+([./][a-z0-9]+)*` +**Origin:** The Origin this User was replicated from, or the empty string for local. +**Name:** The display name of this User. Used to customise the page title for the Tag page. +**Read Access:** List of tags this user has complete read access to. Grants read access to all +entities with this tag. +**Write Access:** List of tags this user has complete write access to. Grants write access to +all entities with this tag. +**Tag Read Access:** List of tags this user can read. Only applies to Tag-like entities. Only needed +for private tags. +**Tag Write Access:** List of tags this user can write. Only applies to Tag-like entities. +**External IDs:** IDs used in an external auth system. Only used when external IDs are enabled. +**Pub Key:** Base 64 encoded public RSA key. Used for verifying signatures to validate authorship. +**Modified:** Last modified date of this User. + +### Plugin +A Plugin is a Tag-like entity used to extend the functionality of Refs. +```json +{ + "tag": "plugin/thumbnail", + "origin": "", + "name": "⭕️ Thumbnail", + "config": {...}, + "defaults": {}, + "schema": { + "optionalProperties": { + "url": {"type": "string"}, + "width": {"type": "int32", "nullable": true}, + "height": {"type": "int32", "nullable": true} + } + }, + "modified": "2022-06-18T16:27:13.774959Z" +} +``` +Only the "tag" field is required. + +Tagging a ref with a Plugin tag applies that plugin to the Ref. The Ref plugin must contain valid +data according to the Plugin schema. + +The combination of Tag and Origin for a Plugin must be unique and may be used as a Primary Composite Key. +Implementations may also make the modified date part of the composite primary key for version history. + +**Tag:** The tag of this Plugin. Must match the regex `[_+]?plugin/[a-z0-9]+([./][a-z0-9]+)*` +**Origin:** The Origin this Plugin was replicated from, or the empty string for local. +**Name:** The display name of this Ext. Used to customise the page title for the Tag page. +**Config:** Arbitrary JSON. +**Defaults:** Default plugin data if creating a new Ref with empty plugin data. May be any JSON value (object, array, or scalar). +**Schema:** Json Type Def (JTD) schema used to validate plugin data in Ref. +**Modified:** Last modified date of this Plugin. + +### Template +A Template is a Tag-like entity used to extend the functionality of Exts. +```json +{ + "tag": "", + "origin": "", + "name": "Default Template", + "config": {...}, + "defaults": { + "pinned": [] + }, + "schema": { + "properties": { + "pinned": {"elements": {"type": "string"}} + }, + "optionalProperties": { + "sidebar": {"type": "string"} + } + }, + "modified": "2022-06-18T16:27:13.774959Z" +} +``` +Only the "tag" field is required (can be the empty string). + +The Tag in the case of a template is actually a Tag prefix. This Template matches all Exts +where its tag followed by a forward slash is a prefix of the Ext tag. In the case of the empty +string the Template matches all Exts. + +The combination of Tag and Origin for this Template must be unique and may be used as a Primary Composite Key. +Implementations may also make the modified date part of the composite primary key for version history. + +**Tag:** The tag of this Template. Must match the regex `[_+]?[a-z0-9]+([./][a-z0-9]+)*` or the empty string. +**Origin:** The Origin this Template was replicated from, or the empty string for local. +**Name:** The display name of this Template. +**Config:** Arbitrary JSON. +**Defaults:** Default Ext config if creating a new Ext with empty config. +**Schema:** Json Type Def (JTD) schema used to validate Ext config. +**Modified:** Last modified date of this Template. + +## Layers +The jasper model is defined in layers. This is to facilitate lower level operations such as routing, querying, +and archiving. + +### Identity Layer +The identity layer of the Jasper model defines how entities are stored or retrieved. A system operating +at this layer should be extremely lenient when validating entities. Only the identity fields of the +entity need to be considered. The identity fields are: +1. Refs: (URL, Origin, Modified) +2. Tags: (Tag, Origin, Modified) + +Together, the (Origin, Modified) keys represent the cursor of the entity, which is used in origin based +replication. + +### Indexing Layer +The indexing layer of the Jasper model adds tags to Refs. A system operating at this layer should support +tag queries, sorting, and filtering. + +### Validation Layer +The validation layer of the Jasper model includes all entity fields. Plugins and Templates are validated +according to their schema. + +#### Plugin and Template Inheritance +Plugins and Templates behave differently in how they inherit the fields of the parent Ext. +Plugins stack and templates merge. +For example, the Plugin `plugin/test` like: +```json +{ + "tag": "plugin/test", + "schema": { + "properties": { + "test": { "type": "string" } + } + } +} +``` +And the Plugin `plugin/test/this` like: +```json +{ + "tag": "plugin/test/this", + "schema": { + "properties": { + "more": { "type": "string" } + } + } +} +``` +If we use both of these plugins in the same Ref, both plugins would have their +data stacked, like: +```json +{ + "url": "test:1", + "plugins": { + "plugin/test": { + "test": "data" + }, + "plugin/test/this": { + "more": "tests" + } + } +} +``` +A template would merge all fields, overwriting at every stage, into a final result. +For example, the Template `a` like: +```json +{ + "tag": "a", + "schema": { + "properties": { + "test": { "type": "string" } + } + } +} +``` +And the Template `a/b` like: +```json +{ + "tag": "a/b", + "schema": { + "properties": { + "more": { "type": "string" } + } + } +} +``` +If we use both of these plugins in the same Ext, both plugins would have their +data merged, like: +```json +{ + "tag": "a/b/c", + "config": { + "test": "data", + "more": "tests" + } +} +``` +If a child Template defines an overlapping field in the schema, it will override the parent type. + +### Modding Layer +The modding layer of the Jasper model is entirely client side. No server changes are required in order to +support new plugins or templates. + +## Cursor Replication +Distributed systems must make tradeoffs according to the [CAP theorem](https://en.wikipedia.org/wiki/CAP_theorem). +According to the CAP theorem you may only provide two of these three guarantees: consistency, availability, +and partition tolerance. Jasper uses an eventually consistent model, where availability and partition +tolerance are guaranteed. The modified date is used as a cursor to efficiently poll for modified records. + +To replicate a Jasper instance simply create a Ref for that instance and tag it `+plugin/origin/pull`. +Add the `+plugin/cron` tag to schedule pulling, or add the `+plugin/user/run` response tag to pull a +single time. + +The modified date of the last entity received will be stored and used for the next poll. When polling, +the Jasper server requests a batch of entities from the remote instance where the modified date is +after the last stored modified date, sorted by modified date ascending. + +### Duplicate Modified Date +Jasper instances should enforce unique modified dates as the cursor for each entity type. Otherwise, +when receiving +a batch of entities, it's possible that the last entity you received has a modified date that is +exactly the same as another entity. If that is the case, requesting the next batch after that modified +date will skip such entities. + +To prevent duplicate modified dates it's enough to add a single millisecond to the date until it +is unique. + +## Deployment +Jasper is available in the following distributions: + - [Docker image](https://github.com/cjmalloy/jasper/pkgs/container/jasper) + - [Helm chart](https://artifacthub.io/packages/helm/jasper/jasper-ui) + - [Jar](https://github.com/cjmalloy/jasper/releases/latest) + +It supports the following configuration options: + +| Environment Variable | Description | Default Value (in prod) | +|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `SERVER_PORT` | Port to listen for HTTP connections. | `8081` | +| `SPRING_PROFILES_ACTIVE` | Set the comma separated list of runtime profiles. | `default` | +| `SPRING_DATASOURCE_URL` | PostgreSQL database connection string. | `jdbc:postgresql://localhost:5432/jasper` | +| `SPRING_DATASOURCE_USERNAME` | PostgreSQL database username. | `jasper` | +| `SPRING_DATASOURCE_PASSWORD` | PostgreSQL database password. | | +| `JASPER_DEBUG` | | `false` | +| `JASPER_LOCAL_ORIGIN` | The origin of this server. The local origin may be set to a sub origin via the `Local-Origin` header. | `""` | +| `JASPER_WORKLOAD` | List of sub-origin sandboxes for worker nodes. | | +| `JASPER_WORKER` | ID of the worker. Must end in a number which is used to index into JASPER_WORKLOAD to set the worker origin. | | +| `JASPER_ALLOW_USER_TAG_HEADER` | Allow pre-authentication of a user via the `User-Tag` header. | `false` | +| `JASPER_ALLOW_USER_ROLE_HEADER` | Allows escalating user role via `User-Role` header. | `false` | +| `JASPER_ALLOW_AUTH_HEADERS` | Allow adding additional user permissions via `Read-Access`, `Write-Access`, `Tag-Read-Access`, and `Tag-Write-Access` headers. | `false` | +| `JASPER_MAX_ROLE` | Highest role allowed to access the server. Users with a higher role will have their role reduced to this. | `ROLE_ADMIN` | +| `JASPER_MIN_ROLE` | Minimum role required to access the server. | `ROLE_ANONYMOUS` | +| `JASPER_MIN_WRITE_ROLE` | Minimum role required to write to the server. | `ROLE_VIEWER` | +| `JASPER_MIN_FETCH_ROLE` | Minimum role required to fetch external resources. | `ROLE_USER` | +| `JASPER_MIN_CONFIG_ROLE` | Minimum role required to edit plugins and templates. | `ROLE_ADMIN` | +| `JASPER_MIN_READ_BACKUPS_ROLE` | Minimum role required to download backups. | `ROLE_ADMIN` | +| `JASPER_DEFAULT_ROLE` | Default role given to all users. | `ROLE_ANONYMOUS` | +| `JASPER_DEFAULT_READ_ACCESS` | Additional read access qualified tags to apply to all users. | | +| `JASPER_DEFAULT_WRITE_ACCESS` | Additional write access qualified tags to apply to all users. | | +| `JASPER_DEFAULT_TAG_READ_ACCESS` | Additional tag read access qualified tags to apply to all users. | | +| `JASPER_DEFAULT_TAG_WRITE_ACCESS` | Additional tag write access qualified tags to apply to all users. | | +| `JASPER_INGEST_MAX_RETRY` | Maximum number of retry attempts for getting a unique modified date when ingesting a Ref. | `5` | +| `JASPER_BACKUP_BUFFER_SIZE` | Size of buffer in bytes used to cache JSON in RAM before flushing to disk during backup. | `1000000` | +| `JASPER_RESTORE_BATCH_SIZE` | Number of entities to restore in each transaction. | `500` | +| `JASPER_BACKFILL_BATCH_SIZE` | Number of entities to generate Metadata for in each transaction when backfilling. | `100` | +| `JASPER_CLEAR_CACHE_COOLDOWN_SEC` | Number of seconds to throttle clearing the config cache. | `2` | +| `JASPER_PUSH_COOLDOWN_SEC` | Number of seconds to throttle pushing after modification. | `1` | +| `JASPER_STORAGE` | Path to the folder to use for storage. Used by the backup system. | `/var/lib/jasper` | +| `JASPER_NODE` | Path to node binary for running javascript deltas. | `/usr/local/bin/node` | +| `JASPER_PYTHON` | Path to python binary for running python scripts. | `/usr/bin/python` | +| `JASPER_SHELL` | Path to shell binary for running shell scripts. | `/usr/bin/bash` | +| `JASPER_CACHE_API` | HTTP address of an instance where storage is enabled. | | +| `JASPER_SSH_CONFIG_NAMESPACE` | K8s namespace to write authorized_keys config map file to. | `default` | +| `JASPER_SSH_CONFIG_MAP_NAME` | K8s config map name to write `authorized_keys` file to. | `ssh-authorized-keys` | +| `JASPER_SSH_SECRET_NAME` | K8s secret name to write the `host_key` file to. | `ssh-host-key` | +| `JASPER_SECURITY_CONTENT_SECURITY_POLICY` | Set the CSP header. | `"default-src 'self'; frame-src 'self' data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"` | +| `JASPER_OVERRIDE_SERVER_EMAIL_HOST` | Override the server email host. | | +| `JASPER_OVERRIDE_SERVER_MAX_SOURCES` | Override the server max sources. | | +| `JASPER_OVERRIDE_SERVER_MOD_SEALS` | Override the server mod seals. | | +| `JASPER_OVERRIDE_SERVER_EDITOR_SEALS` | Override the server editor seals. | | +| `JASPER_OVERRIDE_SERVER_WEB_ORIGINS` | Override the server origins with web access. | | +| `JASPER_OVERRIDE_SERVER_MAX_REPL_ENTITY_BATCH` | Override the server maximum batch size for replicate controller. | | +| `JASPER_OVERRIDE_SERVER_SSH_ORIGINS` | Override the server origins with SSH access. | | +| `JASPER_OVERRIDE_SERVER_MAX_PUSH_ENTITY_BATCH` | Override the server maximum batch size for push replicate. | | +| `JASPER_OVERRIDE_SERVER_MAX_PULL_ENTITY_BATCH` | Override the server maximum batch size for pull replicate. | | +| `JASPER_OVERRIDE_SERVER_SCRIPT_SELECTORS` | Override the server tags and origins that can run scripts. No wildcard origins. | | +| `JASPER_OVERRIDE_SERVER_SCRIPT_WHITELIST` | Override the server list of whitelisted script SHA-256 hashes. | | +| `JASPER_OVERRIDE_SERVER_HOST_WHITELIST` | Override the server list of whitelisted hosts. | | +| `JASPER_OVERRIDE_SERVER_HOST_BLACKLIST` | Override the server list of blacklisted hosts. | | +| `JASPER_OVERRIDE_SERVER_MAX_REQUESTS` | Override the server maximum HTTP requests per origin every 500 nanoseconds. | `50` | +| `JASPER_OVERRIDE_SERVER_MAX_CONCURRENT_REQUESTS` | Override the server global maximum concurrent HTTP requests (across all origins). | `500` | +| `JASPER_OVERRIDE_SERVER_MAX_CONCURRENT_SCRIPTS` | Override the server maximum concurrent script executions. | `100_000` | +| `JASPER_OVERRIDE_SERVER_MAX_CONCURRENT_REPLICATION` | Override the server maximum concurrent replication push/pull operations. | `3` | +| `JASPER_OVERRIDE_SERVER_MAX_CONCURRENT_FETCH` | Override the server maximum concurrent fetch operations (scraping). | `10` | +| `JASPER_OVERRIDE_SECURITY_MODE` | Override the security mode for all origins. | | +| `JASPER_OVERRIDE_SECURITY_CLIENT_ID` | Override the security clientId for all origins. | | +| `JASPER_OVERRIDE_SECURITY_BASE64_SECRET` | Override the security base64Secret for all origins. | | +| `JASPER_OVERRIDE_SECURITY_SECRET` | Override the security secret for all origins. | | +| `JASPER_OVERRIDE_SECURITY_JWKS_URI` | Override the security jwksUri for all origins. | | +| `JASPER_OVERRIDE_SECURITY_USERNAME_CLAIM` | Override the security usernameClaim for all origins. | | +| `JASPER_OVERRIDE_SECURITY_VERIFIED_EMAIL_CLAIM` | Override the security verifiedEmailClaim for all origins. | `unset` | +| `JASPER_OVERRIDE_SECURITY_DEFAULT_USER` | Override the security defaultUser for all origins. | | +| `JASPER_OVERRIDE_SECURITY_TOKEN_ENDPOINT` | Override the security tokenEndpoint for all origins. | | +| `JASPER_OVERRIDE_SECURITY_SCIM_ENDPOINT` | Override the security scimEndpoint for all origins. | | +| `JASPER_OVERRIDE_SECURITY_MAX_REQUESTS` | Override the security maximum HTTP requests per origin every 500 nanoseconds for all origins. | `50` | +| `JASPER_OVERRIDE_SECURITY_MAX_CONCURRENT_SCRIPTS` | Override the security maximum concurrent script executions per origin for all origins. | `5` | +| `JASPER_HEAP` | Set both max and initial heap size for the JVM. Only applies to the docker container. | `512m` | + +### Configuration Templates +Jasper uses special templates in the root origin to configure server-wide and per-origin settings. +These templates are automatically generated with default values if they do not exist. + +#### Server Config (`_config/server` Template) +The `_config/server` template is installed in the root origin (the local origin for this server) +and controls server-wide settings. It is automatically created on startup if it does not exist. + +If the current node is running as a worker in origin @worker, the config used will be +`_config/server/worker` in the local origin (not the worker origin). This allows you to assign +different nodes to run different workloads. + +| Field | Description | Default Value | +|----------------------------|-------------------------------------------------------------------------------------------------|--------------------------------------------| +| `emailHost` | Email host used for sending emails. | `jasper.local` | +| `maxSources` | Maximum number of sources allowed per Ref. | `1000` | +| `modSeals` | List of tags that act as mod seals (protected tags that only mods can add/remove). | `["seal", "+seal", "_seal", "_moderated"]` | +| `editorSeals` | List of tags that act as editor seals. | `["plugin/qc"]` | +| `webOrigins` | Whitelist of origins allowed web access. Supports wildcards. | `[""]` (root origin only) | +| `maxReplEntityBatch` | Maximum batch size for the replicate controller. | `500` | +| `sshOrigins` | Whitelist of origins allowed to open SSH tunnels. | `[""]` (root origin only) | +| `maxPushEntityBatch` | Maximum batch size for push replication. | `5000` | +| `maxPullEntityBatch` | Maximum batch size for pull replication. | `5000` | +| `scriptSelectors` | Whitelist of selectors (tag + origin) allowed to run scripts. No origin wildcards. | `[""]` (root origin only) | +| `scriptWhitelist` | Whitelist of script SHA-256 hashes allowed to run. If empty, all scripts are allowed. | `null` (all allowed) | +| `hostWhitelist` | Whitelist of domains allowed to fetch from. If empty, all hosts are allowed (except blacklist). | `null` (all allowed) | +| `hostBlacklist` | Blacklist of domains not allowed to fetch from. Takes precedence over whitelist. | `["*.local"]` | +| `maxConcurrentScripts` | Maximum concurrent script executions server-wide. | `100_000` | +| `maxConcurrentReplication` | Maximum concurrent replication push/pull operations. | `3` | +| `maxRequests` | Maximum HTTP requests per origin every 500 nanoseconds. | `50` | +| `maxConcurrentRequests` | Global maximum concurrent HTTP requests across all origins. | `500` | +| `maxConcurrentFetch` | Maximum concurrent fetch operations (scraping). | `10` | + +#### Security Config (`_config/security` Template) +The `_config/security` template is installed per-origin to configure authentication and authorization +settings. Each tenant can have their own security configuration. It is automatically used with default +values if it does not exist. Security settings are inherited from parent origins if not set. + +| Field | Description | Default Value | +|--------------------------|--------------------------------------------------------------------------------------------------|-------------------------------------------| +| `mode` | Authentication mode (`jwt` or `jwks`). | `""` (none) | +| `clientId` | Client ID for OAuth2/JWT authentication. | `""` | +| `base64Secret` | Base64 encoded secret for JWT validation. | `""` | +| `secret` | Plain text secret for JWT validation (alternative to base64Secret). | `""` | +| `jwksUri` | URI to JWKS endpoint for token validation. | `""` | +| `tokenEndpoint` | OAuth2 token endpoint. | `""` | +| `scimEndpoint` | SCIM endpoint for user management. | `""` | +| `usernameClaim` | JWT claim to use as the username. | `sub` | +| `externalId` | Enable external ID matching for users. | `false` | +| `emailDomainInUsername` | Include email domain in username. | `false` | +| `rootEmailDomain` | Root email domain for the server. | `""` | +| `verifiedEmailClaim` | JWT claim for verified email status. | `verified_email` | +| `authoritiesClaim` | JWT claim for user authorities/roles. | `auth` | +| `readAccessClaim` | JWT claim for read access tags. | `readAccess` | +| `writeAccessClaim` | JWT claim for write access tags. | `writeAccess` | +| `tagReadAccessClaim` | JWT claim for tag read access. | `tagReadAccess` | +| `tagWriteAccessClaim` | JWT claim for tag write access. | `tagWriteAccess` | +| `minRole` | Minimum role for basic access. | `ROLE_ANONYMOUS` | +| `minWriteRole` | Minimum role for writing. | `ROLE_VIEWER` | +| `minFetchRole` | Minimum role for fetching external resources. | `ROLE_USER` | +| `minConfigRole` | Minimum role for admin configuration. | `ROLE_ADMIN` | +| `minReadBackupsRole` | Minimum role for downloading backups. | `ROLE_ADMIN` | +| `defaultRole` | Default role given to every user. | `ROLE_ANONYMOUS` | +| `defaultUser` | Default user tag given to logged out users. | `""` | +| `defaultReadAccess` | Default read access tags for all users. | `null` | +| `defaultWriteAccess` | Default write access tags for all users. | `null` | +| `defaultTagReadAccess` | Default tag read access tags for all users. | `null` | +| `defaultTagWriteAccess` | Default tag write access tags for all users. | `null` | +| `maxRequests` | Maximum HTTP requests per origin every 500 nanoseconds for this origin. | `50` | +| `maxConcurrentScripts` | Maximum concurrent script executions per origin. | `5` | +| `scriptLimits` | Per-origin script execution limits. Map of selector patterns to max concurrent value. | `{}` (empty) | + +### Profiles +Setting the active profiles is done through the `SPRING_PROFILES_ACTIVE` environment +variable. Multiple profiles can be activated by adding them all as a comma +separated list. + +For production use the `prod` profile should be active. For testing, the `dev` profile will +enable additional logging. + +To enable JWT Token Authentication activate the `jwt` profile. +Either set the `_config/security` template in the Origin receiving traffic: +```json +{ + "mode": "jwt", + "clientId": "", + "base64Secret": "", + "secret": "", + "jwksUri": "", + "usernameClaim": "", + "tokenEndpoint": "", + "scimEndpoint": "" +} +``` +or set the environment variable overrides: +- Set `JASPER_OVERRIDE_SECURITY_MODE` to either `jwt` or `jwks` +- Set `JASPER_OVERRIDE_SECURITY_CLIENT_ID` +- For `jwt` set `JASPER_OVERRIDE_SECURITY_BASE64_SECRET` +- For `jwks` set `JASPER_OVERRIDE_SECURITY_JWKS_URI` + +If your user management server supports SCIM, you can enable the `scim` profile to manage users. +Requires the `_config/security` clientId, secret, and scimEndpoint set. Or +`JASPER_OVERRIDE_SECURITY_CLIENT_ID`, `JASPER_OVERRIDE_SECURITY_BASE64_SECRET`, +and `JASPER_OVERRIDE_SECURITY_SCIM_ENDPOINT` +environment variable. + +The `storage` profile is required for backups, caches, or preloading static files. Use the `JASPER_STORAGE` environment +variable to change the location of the storage folder. + +The `preload` profile lets you preload static files. Zip files in the preload folder +`$JASPER_STORAGE/default/preload`. If `$JASPER_LOCAL_ORIGIN` is set, +`$JASPER_STORAGE/$JASPER_LOCAL_ORIGIN/preload` is used. + +The `scripts` profile enables server side scripting through the `plugin/delta` Plugin. + +## Access Control +Jasper uses a combination of simple roles and Tag Based Access Control (TBAC). There are five +hierarchical roles which cover broad access control, Admin, Mod, Editor, User, and Viewer. The +Anonymous role is given to users who are not logged in. +Roles are hierarchical, so they include any permissions granted to a preceding role. + * `ROLE_ANONYMOUS`: read access to public tags and Refs. + * `ROLE_VIEWER`: logged in user. Can be given access to private tags and Refs. + * `ROLE_USER`: can post refs. Has read/write access to their user tag. + * `ROLE_EDITOR`: can add/remove public tags to any post they have read access to. + * `ROLE_MOD`: can read/write any tag or ref except plugins and templates. + * `ROLE_ADMIN`: complete access to origin and sub-origins. Root admin can access all origins Can read/write plugins +and templates, perform backups and restores. + +Tags are used to provide fine-grained access to resources. For Refs, the list of tags are considered. +For Tags entities, their tag is considered. + +The tag permissions are stored in the User entities: + * Tag Read Access + * Can read tag + * Can add tag + * Tag Write Access + * Can edit tag Ext + * Read Access (Refs and Tags) + * Can read ref with tag + * Can read tag + * Can add tag + * Write Access (Refs and Tags) + * No public tags + * Can write ref with tag + * Can edit tag Ext + +The protected and private versions of the User entity are merged when +calculating the tag access lists. +If external IDs are enabled, all matching users by external ID are also merged. + +### Special URL Schemas + +### Cache +URLs that have the `cache:` scheme represent items stored in a file cache. +Most URLs with a resource in a file cache have a standard `https:` scheme, +as they are just a cache of a resource that exists elsewhere. +When a file is pushed into the cache (such as a generated thumbnail), it is +generated a random `cache:` URL. + +#### Tag URLs +URLs that point to a tag, such as `tag:/history` ignore regular tagging access rules. +Instead, you can access this Ref if you can access the tag it points to. + +#### User URLs +URLs that point to a user tag, such as `tag:/+user/chris` are always owned by the user. +These specials URLs can also be used to store per-plugin config data, +such as `tag:/+user/chris?url=tag:/kanban`. +Visibility of plugin setting can be set on a per-user, per-plugin basis. +For convenience, the user URL is used if a blank URL is passed to the tagging response controller. +This allows you to quickly ensure settings are initialized and fetch / edit Ref plugins and tags to read settings. +If a tag are passed, for example `kanban`, the default is the kanban user settings Ref: `tag:/+user/chris?url=tag:/kanban`. +If a blank URL and a blank tag are passed, the default is the generic user settings Ref: `tag:/+user/chris`. +User plugins, which follow the template `plugin/user`, may **only** be added to user URL Refs. + +### Special Tags +Some public tags have special significance: + * `public`: everyone can read + * `internal`: don't show in UI normally, count separately in metadata + * `locked`: No edits allowed (tagging is allowed, but not removing plugin data) + +### Multi-tenant +Users only have read-access to their own origin and sub-origins. +For example, if a tenant has origin `@test`, they can also read `@test.other`. As usual, writing to +origins other than your own is never allowed. + +### Access Tokens +When running the system with JWT authentication, roles may be added as claims. +For example: +```json +{ + "sub": "username", + "auth": "ROLE_USER" +} +``` + +Note: The claim names may be changed with the `JASPER_USERNAME_CLAIM` +and `JASPER_AUTHORITIES_CLAIM` properties. + +## Backup / Restore +Jasper has a built-in backup system for mods and/or admins. Regular users should instead replicate to a separate jasper instance. +In order to use the backup system, the `storage` profile must be active. + +## Validation +When ingesting entities, Jasper performs the following validation: + * Fields must not exceed their maximum length + * URLS are valid according to the regex `(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))` + * Tags are valid according to their respective prefix and the general tag regex `[_+]?[a-z0-9]+([./][a-z0-9]+)*` + * If a Ref has plugins present, any plugin data must conform to the plugin's schema + * If an Ext matches a template prefix, any config must conform to all matching templates merged schemas + +Plugin and Template schemas are in JTD, which only validates the shape of the data. In addition +to total bytes of the entity, these are the only server side data validations performed. No security related +validations should be required on Ref or Ext data, so client side validation should be sufficient in most cases. +Error checking should be the first part of any script parsing user input as part of a workflow. +We always want to err on the side of accepting well-shaped data rather than rejecting it, as server validation +errors rejecting valid user input are infuriating and very common. Error correction can happen as a follow-up step +if the client validation was somehow circumvented. + +## Metadata +Jasper uses metadata generation to pre-compute graph connections. This allows us to store derived data outside +of the main data model and keeps our queries join free. + +Jasper generates the following metadata in Refs: + * List of responses: This is an inverse lookup of the Ref sources. Excludes any Refs with the internal tag. + * List of internal responses: This is an inverse lookup of the Ref sources that include the internal tag. + * List of plugin responses: A list of responses with that plugin. + * List of user plugin responses: A list of responses with that plugin. + * Obsolete: flag set if another origin contains the newest version of this Ref + +Metadata is never transferred during replication. A simplified version is sent over the client API, with +counts for each response type, and user plugin responses for the current user. + +## Server Scripting +When the `scripts` profile is active, scripts may be attached to Refs with either the `plugin/delta` tag or the +`plugin/script` tag. +Only admin users may install scripts and they run with very few guardrails. A regular user may invoke the script +by tagging a Ref. The tagged ref will be serialized as UTF-8 JSON and passed to stdin. Environment variables will +include the API endpoint as `JASPER_API`. Return a non-zero error code to fail the script and attach an error log. +The script should by writing UTF-8 JSON to stdout of the form: + +```json +{ + "ref": [], + "ext": [], + "user": [], + "plugin": [], + "template": [] +} +``` + +These entities will either be created or updated, as necessary. + +Adding the `+plugin/error` tag will prevent any further processing. Remove the `+plugin/error` tag to retry. +You can also attach any error logs for the user to see by replying to the delta with the `+plugin/log` tag. Logs should +be tagged `internal` to prevent clutter, and should match the visibility of the parent delta (`public` or not) with the +same owner so the user can clear the logs as desired. + +### Delta Scripts +Any Refs with a `plugin/delta` tag will run the attached script when modified. + +You can use this to mark the input Ref as completed by either: +1. Removing the `plugin/delta` tag +2. Adding a `+plugin/delta` Plugin response + +Here are examples that reply in all uppercase: + +#### Remove the `plugin/delta` tag: +Use this approach when a script could be run multiple times to create multiple outputs. +```javascript +const whatPlugin = { + tag: 'plugin/delta/what', + config: { + timeoutMs: 30_000, + language: 'javascript', + // language=JavaScript + script: ` + const ref = JSON.parse(require('fs').readFileSync(0, 'utf-8')); + const louderRef = { + url: 'yousaid:' + ref.url, + sources: [ref.url], + comment: ref.comment.toUpperCase(), + }; + louderRef.tags = ref.tags = ref.tags.filter(t => t !== 'plugin/delta/what' && !t.startsWith('plugin/delta/what/')); + console.log(JSON.stringify({ + ref: [ref, louderRef], + })); + `, + }, +}; +``` + +#### Add the `+plugin/delta` Plugin response: +This is the recommended approach as it does need to modify existing Refs and +is less likely for a bug to cause an infinite loop. +```javascript +const whatPlugin = { + tag: 'plugin/delta/what', + config: { + timeoutMs: 30_000, + language: 'javascript', + // language=JavaScript + script: ` + const ref = JSON.parse(require('fs').readFileSync(0, 'utf-8')); + const louderRef = { + url: 'yousaid:' + ref.url, + sources: [ref.url], + comment: ref.comment.toUpperCase(), + tags: ['+plugin/delta/what'] + }; + console.log(JSON.stringify({ + ref: [louderRef], + })); + `, + }, +}; +``` + +### Cron scripts +Any Refs with a `plugin/script` tag will run the attached script when the `+plugin/cron` tag is also present. +The `+plugin/cron` tag contains plugin data with a default interval of 15 minutes: +```json +{ + "interval": "PT15M" +} +``` + +When the `+plugin/cron` tag is present the script will be run repeatedly at the interval specified. Removing the +`+plugin/cron` tag will disable the script. + +#### Example +Here is a script that outputs the current time: +```javascript +const timePlugin = { + tag: 'plugin/script/time', + config: { + timeoutMs: 30_000, + language: 'javascript', + // language=JavaScript + script: ` + const uuid = require('uuid'); + const ref = JSON.parse(require('fs').readFileSync(0, 'utf-8')); + const timeRef = { + url: 'comment:' + uuid.v4(), + sources: [ref.url], + comment: '' + new Date(), + tags: ['public', 'time'] + }; + console.log(JSON.stringify({ + ref: [timeRef], + })); + `, + }, +}; +``` + +## Remote Origin +The `+plugin/origin` tag marks a Ref as a Remote Origin and associates it with a local alias. These may be either pulled from or pushed to. +```json +{ + "optionalProperties": { + "local": { "type": "string" }, + "remote": { "type": "string" }, + "proxy": { "type": "string" } + } +} +``` + +**Local:** Local alias for the remote origin. +**Remote:** Remote origin to query, or blank for the default. +**Proxy:** Alternate URL to replicate from. + +## Replicating Remote Origin +The `+plugin/origin/pull` tag can be used to replicate remote origins. Since this plugin +extends `+plugin/origin`, we already have the `local` and `remote` +fields set. +```json +{ + "optionalProperties": { + "query": { "type": "string" }, + "batchSize": { "type": "int32" }, + "websocket": { "type": "boolean" }, + "cachePrefetch": { "type": "boolean" }, + "cacheProxy": { "type": "boolean" }, + "cacheProxyPrefetch": { "type": "boolean" }, + "validatePlugins": { "type": "boolean" }, + "stripInvalidPlugins": { "type": "boolean" }, + "validateTemplates": { "type": "boolean" }, + "stripInvalidTemplates": { "type": "boolean" }, + "addTags": { "elements": { "type": "string" } }, + "removeTags": { "elements": { "type": "string" } } + } +} +``` + +**Query:** Restrict results using a query. Can not use qualified tags as replication only works on a single origin at +a time. If you want to combine multiple origins into one, create multiple `+plugin/origin` Refs. +**Batch Size:** The max page size to pull each request. +**Websocket:** Listen to websocket cursor updates to pull. +**Cache Prefetch:** Attempt to pull cached files while pulling Refs. +**Cache Proxy:** Proxy all resources files through this origin's cache, not just cached files. +**Cache Proxy Prefetch:** Attempt to pull all resources files through this origin's cache while pulling Refs. +**Validate Plugins:** Flag to enable, disable plugin validation. +**Strip Invalid Plugins:** If plugin validation is enabled, strip invalid plugins instead of skipping invalid Refs. +**Validate Templates:** Flag to enable, disable template validation. +**Strip Invalid Template:** If template validation is enabled, strip invalid templates instead of skipping invalid Exts. +**Add Tags:** Tags to apply to any Refs replicated from this origin. +**Remove Tags:** Tags to remove from any Refs replicated from this origin. + +## Pushing to a Remote Origin +The `+plugin/origin/push` tag can be used to replicate remote origins. Since this plugin +extends `+plugin/origin`, we already have the `local` and `remote` +fields set. +```json +{ + "optionalProperties": { + "query": { "type": "string" }, + "batchSize": { "type": "int32" }, + "pushOnChange": { "type": "boolean" }, + "cache": { "type": "boolean" } + } +} +``` + +**Query:** Restrict push using a query. Can not use qualified tags as replication only works on a single origin at +a time. If you want to combine multiple origins into one, create multiple `+plugin/origin` Refs. +**Batch Size:** The max page size of entities to push. +**Push On Change:** Push entities immediately after modification. +**Cache:** Also push cached files. + +## Random Number Generator + +The `plugin/rng` tag can be used to generate random numbers. Random numbers are generated whenever editing, creating, or +pushing a Ref replaces an existing Ref of a different origin. When a new random number is generated it is represented in +hex +in the tag `+plugin/rng/6d7eb8ebb38a47d29c6a6cbc9156a1a3`, for example. When replicated, random numbers will not be +overwritten so that spectators may verify the results. Editing of a Ref that is already the latest +version across all origins will preserve the existing random number or lack thereof. This ensures random numbers can't +be farmed, as you cannot generate a new number without cooperation from another origin. + +When delegating rng to a trusted server, users push their updates to that server and replicate the results. +When playing on mutually replicating servers, each server is trusted to generate their own rng. + +## Release Notes +* [v1.2](./docs/release-notes/jasper-1.2.md) +* [v1.1](./docs/release-notes/jasper-1.1.md) +* [v1.0](./docs/release-notes/jasper-1.0.md) + +## Developing +Run a dev server with `docker compose up`. +Run a supporting dev database and cache with `docker compose up db redis -d`. + +### Build + +Run `docker build -t jasper .` to build the project. + +### Running unit tests + +Run `docker build --target=test -t jasper-tests .` to build the tests. +Run `docker run -it jasper-tests` to execute the unit tests. + +### Running end-to-end tests + +See [Jasper-UI Playwright Tests](https://github.com/cjmalloy/jasper-ui/actions/workflows/playwright.yml). diff --git a/jdk_25_maven/cs/rest/jasper/pom.xml b/jdk_25_maven/cs/rest/jasper/pom.xml new file mode 100644 index 000000000..7956ace59 --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/pom.xml @@ -0,0 +1,537 @@ + + + 4.0.0 + jasper + jasper + 1.3.0-SNAPSHOT + jasper + Knowledge graph server + + + 25 + ${java.version} + ${java.version} + ${java.version} + UTF-8 + UTF-8 + jasper.JasperApplication + -Djava.security.egd=file:/dev/./urandom -Xmx256m + @ + 4.1.0 + 2025.1.2 + 1.18.46 + 2.0.5 + 1.6.3 + 3.53.2.0 + 7.4.1.Final + 3.15.4 + 0.2.2 + 1.13 + 0.29.1 + 3.0.3 + 5.4.0 + 1.4.2 + 1.2 + 2.1.0 + 5.6.2 + 2.22.0 + 4.5.0 + 3.20.0 + 1.28.0 + 1.22.2 + 2.3.8 + 2.12.0 + + + + + org.projectlombok + lombok + ${lombok.version} + provided + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-oauth2-resource-server + + + org.springframework.boot + spring-boot-starter-webmvc + + + org.springframework.boot + spring-boot-starter-cache + + + com.github.ben-manes.caffeine + caffeine + + + org.springframework.boot + spring-boot-starter-liquibase + + + jakarta.annotation + jakarta.annotation-api + + + org.springframework.boot + spring-boot-jackson2 + + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + + + com.fasterxml.jackson.datatype + jackson-datatype-hibernate7 + + + com.fasterxml.jackson.datatype + jackson-datatype-hppc + + + org.springdoc + springdoc-openapi-starter-webmvc-ui + ${springdoc-openapi.version} + + + org.springframework.data + spring-data-commons + + + com.zaxxer + HikariCP + + + org.apache.commons + commons-compress + ${commons-compress.version} + + + org.apache.commons + commons-collections4 + ${commons-collections4.version} + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + commons-io + commons-io + ${commons-io.version} + + + com.drewnoakes + metadata-extractor + 2.20.0 + + + com.jsontypedef.jtd + jtd + ${jsontypedef.version} + + + com.github.java-json-tools + json-patch + ${json-patch.version} + + + org.hibernate.orm + hibernate-jpamodelgen + ${hibernate-jpamodelgen.version} + provided + + + org.hibernate.orm + hibernate-processor + provided + + + org.hibernate.orm + hibernate-core + + + org.hibernate.validator + hibernate-validator + + + io.hypersistence + hypersistence-utils-hibernate-71 + ${hypersistence-utils-71.version} + + + org.mapstruct + mapstruct + ${mapstruct.version} + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + provided + + + org.springframework.boot + spring-boot-configuration-processor + provided + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-logging + + + org.zalando + problem-spring-web + ${problem-spring-web.version} + + + org.springframework.boot + spring-boot-starter-tomcat + + + org.springframework.boot + spring-boot-starter-mail + + + org.springframework + spring-websocket + + + org.springframework + spring-messaging + + + org.springframework.cloud + spring-cloud-starter-kubernetes-fabric8 + + + com.rometools + rome + ${rome.version} + + + com.rometools + rome-modules + ${rome.version} + + + org.apache.httpcomponents.client5 + httpclient5 + ${apache-httpclient.version} + + + org.jsoup + jsoup + ${jsoup.version} + + + com.unboundid.product.scim2 + scim2-sdk-client + ${scim2-client.version} + + + io.github.openfeign + feign-httpclient + + + org.apache.sshd + sshd-core + 2.19.0 + + + org.postgresql + postgresql + runtime + + + org.xerial + sqlite-jdbc + ${sqlite-jdbc.version} + + + org.hibernate.orm + hibernate-community-dialects + + + com.rubiconproject.oss + jchronic + 0.2.8 + + + + + org.springframework.cloud + spring-cloud-starter-circuitbreaker-resilience4j + + + io.github.resilience4j + resilience4j-bulkhead + + + org.springframework.retry + spring-retry + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.security + spring-security-data + + + org.springframework.boot + spring-boot-starter-integration + + + org.springframework.integration + spring-integration-redis + + + org.springframework.boot + spring-boot-starter-data-redis + + + io.micrometer + micrometer-registry-prometheus + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-starter-webmvc-test + test + + + org.xmlunit + xmlunit-core + ${xmlunit.version} + test + + + + javax.xml.bind + jaxb-api + + + + + org.springframework.security + spring-security-test + test + + + org.springframework.integration + spring-integration-test + test + + + org.testcontainers + testcontainers-junit-jupiter + test + + + org.testcontainers + testcontainers-postgresql + test + + + org.springframework.boot + spring-boot-starter-liquibase-test + test + + + com.tngtech.archunit + archunit-junit5-api + ${archunit-junit5.version} + test + + + + + com.tngtech.archunit + archunit-junit5-engine + ${archunit-junit5.version} + test + + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + org.testcontainers + testcontainers-bom + ${testcontainers.version} + pom + import + + + + + + spring-boot:run + + + ${basedir}/src/main/resources + true + + **/application*.yml + **/application*.yaml + **/application*.properties + + + + ${basedir}/src/main/resources + + **/application*.yml + **/application*.yaml + **/application*.properties + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.15 + + + + prepare-agent + + + + report + + report + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + + + repackage + + repackage + + + jasper + sut + + + + + ${start-class} + + true + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.15.0 + + true + ${java.version} + ${java.version} + ${java.version} + full + + + + org.apache.maven.plugins + maven-resources-plugin + 3.5.0 + + ${project.build.sourceEncoding} + + ${resource.delimiter} + + false + + + + org.apache.maven.plugins + maven-jar-plugin + 3.5.0 + + + + ${start-class} + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.6 + + + **/*Test.java + **/*IT.java + + @{argLine} -Xmx1024m + + + + org.apache.maven.plugins + maven-failsafe-plugin + 3.5.6 + + + + integration-test + verify + + + + + ${project.build.outputDirectory} + + + + + diff --git a/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/JasperApplication.java b/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/JasperApplication.java new file mode 100644 index 000000000..1d6e0f910 --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/JasperApplication.java @@ -0,0 +1,29 @@ +package jasper; + +import jasper.config.Props; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration; +import org.springframework.boot.liquibase.autoconfigure.LiquibaseProperties; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.cloud.kubernetes.fabric8.discovery.Fabric8CatalogWatchAutoConfiguration; +import org.springframework.cloud.kubernetes.fabric8.discovery.Fabric8DiscoveryClientAutoConfiguration; + +@SpringBootApplication( + exclude = { + Fabric8DiscoveryClientAutoConfiguration.class, + Fabric8CatalogWatchAutoConfiguration.class, + DataRedisAutoConfiguration.class, + }, + excludeName = "org.springframework.cloud.kubernetes.fabric8.discovery.Fabric8InformerAutoConfiguration" +) +@EnableConfigurationProperties({ LiquibaseProperties.class, Props.class }) +@EnableCaching +public class JasperApplication { + + static void main(String[] args) { + SpringApplication.run(JasperApplication.class, args); + } + +} diff --git a/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/ClearIdle.java b/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/ClearIdle.java new file mode 100644 index 000000000..ef3debb54 --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/ClearIdle.java @@ -0,0 +1,16 @@ +package jasper.aop; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation to mark REST controllers or methods that should reset the idle timer. + * Used by the backfill system to detect when the server is idle. + * Should not be applied to public replication endpoints (pub/). + */ +@Target({ElementType.TYPE, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface ClearIdle { +} diff --git a/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/IdleAspect.java b/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/IdleAspect.java new file mode 100644 index 000000000..1571654da --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/IdleAspect.java @@ -0,0 +1,56 @@ +package jasper.aop; + +import jasper.config.Props; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.annotation.Pointcut; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.time.Instant; + +/** + * Aspect that resets the idle timer when a REST controller method annotated + * with @ClearIdle is invoked. + */ +@Aspect +@Component +public class IdleAspect { + + @Autowired + Props props; + + private volatile Instant lastActivity = Instant.now(); + + /** + * Record that the server received a REST API request. + */ + public void clearIdle() { + lastActivity = Instant.now(); + } + + /** + * Check if the server has been idle for the configured amount of time. + */ + public boolean isIdle() { + if (props.getBackfillIdleSec() <= 0) return true; + return Instant.now().isAfter(lastActivity.plusSeconds(props.getBackfillIdleSec())); + } + + /** + * Pointcut matching methods in classes annotated with @ClearIdle. + */ + @Pointcut("within(@jasper.aop.ClearIdle *)") + public void clearIdleClass() {} + + /** + * Pointcut matching methods annotated with @ClearIdle. + */ + @Pointcut("@annotation(jasper.aop.ClearIdle)") + public void clearIdleMethod() {} + + @Before("clearIdleClass() || clearIdleMethod()") + public void resetIdleTimer() { + clearIdle(); + } +} diff --git a/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/logging/LoggingAspect.java b/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/logging/LoggingAspect.java new file mode 100644 index 000000000..08ebd90c4 --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/aop/logging/LoggingAspect.java @@ -0,0 +1,102 @@ +package jasper.aop.logging; + +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.env.Environment; + +import java.util.Arrays; + +/** + * Aspect for logging execution of service and repository Spring components. + * + * By default, it only runs with the "dev" profile. + */ +@Aspect +public class LoggingAspect { + + private final Environment env; + + public LoggingAspect(Environment env) { + this.env = env; + } + + /** + * Pointcut that matches all repositories, services and Web REST endpoints. + */ + @Pointcut( + "within(@org.springframework.stereotype.Repository *) || " + + "within(@org.springframework.stereotype.Service *) || " + + "within(@org.springframework.web.bind.annotation.RestController *)") + public void springBeanPointcut() { + // Method is empty as this is just a Pointcut, the implementations are in the advices. + } + + /** + * Pointcut that matches all Spring beans in the application's main packages. + */ + @Pointcut( + "within(jasper.client..*) || " + + "within(jasper.repository..*) || " + + "within(jasper.service..*) || " + + "within(jasper.web.rest..*)") + public void applicationPackagePointcut() { + // Method is empty as this is just a Pointcut, the implementations are in the advices. + } + + /** + * Retrieves the {@link Logger} associated to the given {@link JoinPoint}. + * + * @param joinPoint join point we want the logger for. + * @return {@link Logger} associated to the given {@link JoinPoint}. + */ + private Logger logger(JoinPoint joinPoint) { + return LoggerFactory.getLogger(joinPoint.getSignature().getDeclaringTypeName()); + } + + /** + * Advice that logs methods throwing exceptions. + * + * @param joinPoint join point for advice. + * @param e exception. + */ + @AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e") + public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { + logger(joinPoint).debug( + "Exception in {}() with cause = {}", + joinPoint.getSignature().getName(), + e.getCause() != null ? e.getCause() : "NULL" + ); + logger(joinPoint).trace("", e); + } + + /** + * Advice that logs when a method is entered and exited. + * + * @param joinPoint join point for advice. + * @return result. + * @throws Throwable throws {@link IllegalArgumentException}. + */ + @Around("applicationPackagePointcut() && springBeanPointcut()") + public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { + Logger log = logger(joinPoint); + if (log.isDebugEnabled()) { + log.debug("Enter: {}() with argument[s] = {}", joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs())); + } + try { + Object result = joinPoint.proceed(); + if (log.isDebugEnabled()) { + log.debug("Exit: {}() with result = {}", joinPoint.getSignature().getName(), result); + } + return result; + } catch (IllegalArgumentException e) { + log.error("Illegal argument: {} in {}()", Arrays.toString(joinPoint.getArgs()), joinPoint.getSignature().getName()); + throw e; + } + } +} diff --git a/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/client/JasperClient.java b/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/client/JasperClient.java new file mode 100644 index 000000000..98c4d047a --- /dev/null +++ b/jdk_25_maven/cs/rest/jasper/src/main/java/jasper/client/JasperClient.java @@ -0,0 +1,135 @@ +package jasper.client; + +import feign.HeaderMap; +import feign.Param; +import feign.QueryMap; +import feign.RequestLine; +import jasper.domain.Ext; +import jasper.domain.Plugin; +import jasper.domain.Ref; +import jasper.domain.Template; +import jasper.domain.User; +import jasper.service.dto.RefReplDto; +import jasper.service.dto.UserDto; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.core.io.Resource; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.WebRequest; + +import java.net.URI; +import java.time.Instant; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import static jasper.security.Auth.LOCAL_ORIGIN_HEADER; +import static jasper.security.Auth.READ_ACCESS_HEADER; +import static jasper.security.Auth.TAG_READ_ACCESS_HEADER; +import static jasper.security.Auth.TAG_WRITE_ACCESS_HEADER; +import static jasper.security.Auth.USER_ROLE_HEADER; +import static jasper.security.Auth.USER_TAG_HEADER; +import static jasper.security.Auth.WRITE_ACCESS_HEADER; + +@FeignClient(value = "jasper", url = "https://jasperkm.info") +public interface JasperClient { + + @RequestLine("GET /pub/api/v1/repl/ref") + List refPull(URI baseUri, @QueryMap Map params); + @RequestLine("GET /pub/api/v1/repl/ref") + List refPull(URI baseUri, @HeaderMap Map headers, @QueryMap Map params); + @RequestLine("GET /pub/api/v1/repl/ref/cursor?origin={origin}") + Instant refCursor(URI baseUri, @Param("origin") String origin); + @RequestLine("GET /pub/api/v1/repl/ref/cursor?origin={origin}") + Instant refCursor(URI baseUri, @HeaderMap Map headers, @Param("origin") String origin); + @RequestLine("POST /pub/api/v1/repl/ref?origin={origin}") + void refPush(URI baseUri, @Param("origin") String origin, List push); + @RequestLine("POST /pub/api/v1/repl/ref?origin={origin}") + void refPush(URI baseUri, @HeaderMap Map headers, @Param("origin") String origin, List push); + + @RequestLine("GET /pub/api/v1/repl/ext") + List extPull(URI baseUri, @QueryMap Map params); + @RequestLine("GET /pub/api/v1/repl/ext") + List extPull(URI baseUri, @HeaderMap Map headers, @QueryMap Map params); + @RequestLine("GET /pub/api/v1/repl/ext/cursor?origin={origin}") + Instant extCursor(URI baseUri, @Param("origin") String origin); + @RequestLine("GET /pub/api/v1/repl/ext/cursor?origin={origin}") + Instant extCursor(URI baseUri, @HeaderMap Map headers, @Param("origin") String origin); + @RequestLine("POST /pub/api/v1/repl/ext?origin={origin}") + void extPush(URI baseUri, @Param("origin") String origin, List push); + @RequestLine("POST /pub/api/v1/repl/ext?origin={origin}") + void extPush(URI baseUri, @HeaderMap Map headers, @Param("origin") String origin, List push); + + @RequestLine("GET /pub/api/v1/repl/user") + List userPull(URI baseUri, @QueryMap Map params); + @RequestLine("GET /pub/api/v1/repl/user") + List userPull(URI baseUri, @HeaderMap Map headers, @QueryMap Map params); + @RequestLine("GET /pub/api/v1/repl/user/cursor?origin={origin}") + Instant userCursor(URI baseUri, @Param("origin") String origin); + @RequestLine("GET /pub/api/v1/repl/user/cursor?origin={origin}") + Instant userCursor(URI baseUri, @HeaderMap Map headers, @Param("origin") String origin); + @RequestLine("POST /pub/api/v1/repl/user?origin={origin}") + void userPush(URI baseUri, @Param("origin") String origin, List push); + @RequestLine("POST /pub/api/v1/repl/user?origin={origin}") + void userPush(URI baseUri, @HeaderMap Map headers, @Param("origin") String origin, List push); + + @RequestLine("GET /pub/api/v1/repl/plugin") + List pluginPull(URI baseUri, @QueryMap Map params); + @RequestLine("GET /pub/api/v1/repl/plugin") + List pluginPull(URI baseUri, @HeaderMap Map headers, @QueryMap Map params); + @RequestLine("GET /pub/api/v1/repl/plugin/cursor?origin={origin}") + Instant pluginCursor(URI baseUri, @Param("origin") String origin); + @RequestLine("GET /pub/api/v1/repl/plugin/cursor?origin={origin}") + Instant pluginCursor(URI baseUri, @HeaderMap Map headers, @Param("origin") String origin); + @RequestLine("POST /pub/api/v1/repl/plugin?origin={origin}") + void pluginPush(URI baseUri, @Param("origin") String origin, List push); + @RequestLine("POST /pub/api/v1/repl/plugin?origin={origin}") + void pluginPush(URI baseUri, @HeaderMap Map headers, @Param("origin") String origin, List push); + + @RequestLine("GET /pub/api/v1/repl/template") + List