From 2033837e48ef74c6818f0b7fd27b040a112257d5 Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 18 Jan 2024 17:20:22 +0000 Subject: [PATCH 1/4] Update the license (close #150) --- LICENSE-2.0.txt | 202 ------------------ LICENSE.md | 57 +++++ README.md | 17 +- build.sbt | 4 + project/BuildSettings.scala | 26 ++- project/plugins.sbt | 1 + src/main/resources/application.conf | 8 + .../iglu/server/Config.scala | 18 +- .../snowplowanalytics/iglu/server/Main.scala | 18 +- .../iglu/server/Server.scala | 18 +- .../snowplowanalytics/iglu/server/Utils.scala | 18 +- .../iglu/server/Webhook.scala | 18 +- .../iglu/server/codecs/JsonCodecs.scala | 18 +- .../iglu/server/codecs/Swagger.scala | 18 +- .../iglu/server/codecs/UriParsers.scala | 18 +- .../iglu/server/codecs/package.scala | 18 +- .../server/middleware/BadRequestHandler.scala | 18 +- .../server/middleware/CachingMiddleware.scala | 18 +- .../middleware/PermissionMiddleware.scala | 18 +- .../iglu/server/migrations/Bootstrap.scala | 18 +- .../iglu/server/migrations/Fifth.scala | 18 +- .../iglu/server/migrations/MigrateFrom.scala | 18 +- .../iglu/server/model/IgluResponse.scala | 18 +- .../iglu/server/model/Permission.scala | 18 +- .../iglu/server/model/Schema.scala | 18 +- .../iglu/server/model/SchemaDraft.scala | 18 +- .../iglu/server/model/VersionCursor.scala | 18 +- .../iglu/server/model/package.scala | 18 +- .../iglu/server/service/AuthService.scala | 18 +- .../iglu/server/service/DebugService.scala | 18 +- .../iglu/server/service/DraftService.scala | 18 +- .../iglu/server/service/MetaService.scala | 18 +- .../iglu/server/service/SchemaService.scala | 18 +- .../iglu/server/service/StaticService.scala | 18 +- .../server/service/ValidationService.scala | 18 +- .../iglu/server/storage/InMemory.scala | 18 +- .../iglu/server/storage/Postgres.scala | 18 +- .../iglu/server/storage/Storage.scala | 18 +- src/test/resources/valid-dummy-config.conf | 17 +- src/test/resources/valid-pg-config.conf | 17 +- src/test/resources/valid-pg-minimal.conf | 17 +- .../iglu/server/ConfigSpec.scala | 18 +- .../iglu/server/ServerSpec.scala | 18 +- .../iglu/server/SpecHelpers.scala | 18 +- .../iglu/server/WebhookSpec.scala | 18 +- .../iglu/server/model/PermissionSpec.scala | 18 +- .../iglu/server/model/SchemaSpec.scala | 18 +- .../iglu/server/model/VersionCursorSpec.scala | 18 +- .../iglu/server/service/AuthServiceSpec.scala | 18 +- .../server/service/SchemaServiceSpec.scala | 18 +- .../server/service/StorageAgnosticSpec.scala | 10 + .../server/service/SupersedingLogicSpec.scala | 10 + .../service/ValidationServiceSpec.scala | 18 +- .../iglu/server/storage/PostgresSpec.scala | 18 +- 54 files changed, 433 insertions(+), 709 deletions(-) delete mode 100644 LICENSE-2.0.txt create mode 100644 LICENSE.md diff --git a/LICENSE-2.0.txt b/LICENSE-2.0.txt deleted file mode 100644 index 9d500a2..0000000 --- a/LICENSE-2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016-2023 Snowplow Analytics Ltd. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..6abbe69 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,57 @@ +# Snowplow Limited Use License Agreement + +_Version 1.0, January 2024_ + +This Snowplow Limited Use License Agreement, Version 1.0 (the “Agreement”) sets forth the terms on which Snowplow Analytics, Ltd. (“Snowplow”) makes available certain software (the “Software”). BY INSTALLING, DOWNLOADING, ACCESSING, OR USING ANY OF THE SOFTWARE, YOU AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO SUCH TERMS AND CONDITIONS, YOU MUST NOT USE THE SOFTWARE. IF YOU ARE RECEIVING THE SOFTWARE ON BEHALF OF A LEGAL ENTITY, YOU REPRESENT AND WARRANT THAT YOU HAVE THE ACTUAL AUTHORITY TO AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT ON BEHALF OF SUCH ENTITY. “Licensee” means you, an individual, or the entity on whose behalf you are receiving the Software. + +## LICENSE GRANT AND CONDITIONS + +**1.1 License.** Subject to the terms and conditions of this Agreement, Snowplow hereby grants to Licensee a non-exclusive, royalty-free, worldwide, non-transferable, non-sublicensable license during the term of this Agreement to: (a) use the Software; (b) prepare modifications and derivative works of the Software; and (c) reproduce copies of the Software (the “License”). No right to distribute or make available the Software is granted under this License. Licensee is not granted the right to, and Licensee shall not, exercise the License for any Excluded Purpose. + +**1.2** For purposes of this Agreement, an “Excluded Purpose” is any use that is either a Competing Use or a Highly-Available Production Use, or both of them. + +* **1.2.1** A “Competing Use” is making available any on-premises or distributed software product, or any software-as-a-service, platform-as-a-service, infrastructure-as-a-service, or other similar online service, that competes with any products or services that Snowplow or any of its affiliates provides using the Software. + +* **1.2.2** Highly-Available Production Use is any highly-available use, including without limitation any use where multiple instances of any Software component run concurrently to avoid a single point of failure, in a production environment, where production means use on live data. + +**1.3 Conditions.** In consideration of the License, Licensee’s use of the Software is subject to the following conditions: + +* **a.** Licensee must cause any Software modified by Licensee to carry prominent notices stating that Licensee modified the Software. + +* **b.** On each Software copy, Licensee shall reproduce and not remove or alter all Snowplow or third party copyright or other proprietary notices contained in the Software, and Licensee must include the notice below on each copy. + + ``` + This software is made available by Snowplow Analytics, Ltd., + under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + located at https://docs.snowplow.io/limited-use-license-1.0 + BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. + ``` + +**1.4 Licensee Modifications.** Licensee may add its own copyright notices to modifications made by Licensee. + +**1.5 No Sublicensing.** The License does not include the right to sublicense the Software, however, each recipient to which Licensee provides the Software may exercise the Licenses so long as such recipient agrees to the terms and conditions of this Agreement. + +## TERM AND TERMINATION + +This Agreement will continue unless and until earlier terminated as set forth herein. If Licensee breaches any of its conditions or obligations under this Agreement, this Agreement will terminate automatically and the License will terminate automatically and permanently. + +## INTELLECTUAL PROPERTY + +As between the parties, Snowplow will retain all right, title, and interest in the Software, and all intellectual property rights therein. Snowplow hereby reserves all rights not expressly granted to Licensee in this Agreement. Snowplow hereby reserves all rights in its trademarks and service marks, and no licenses therein are granted in this Agreement. + +## DISCLAIMER + +SNOWPLOW HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE SOFTWARE. + +## LIMITATION OF LIABILITY + +SNOWPLOW WILL NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO LOST PROFITS OR ANY CONSEQUENTIAL, SPECIAL, INCIDENTAL, INDIRECT, OR DIRECT DAMAGES, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ARISING OUT OF THIS AGREEMENT. THE FOREGOING SHALL APPLY TO THE EXTENT PERMITTED BY APPLICABLE LAW. + +## GENERAL + +**6.1 Governing Law.** This Agreement will be governed by and interpreted in accordance with the laws of the state of Delaware, without reference to its conflict of laws principles. If Licensee is located within the United States, all disputes arising out of this Agreement are subject to the exclusive jurisdiction of courts located in Delaware, USA. If Licensee is located outside of the United States, any dispute, controversy or claim arising out of or relating to this Agreement will be referred to and finally determined by arbitration in accordance with the JAMS International Arbitration Rules. The tribunal will consist of one arbitrator. The place of arbitration will be in the State of Delaware, USA. The language to be used in the arbitral proceedings will be English. Judgment upon the award rendered by the arbitrator may be entered in any court having jurisdiction thereof. + +**6.2. Assignment.** Licensee is not authorized to assign its rights under this Agreement to any third party. Snowplow may freely assign its rights under this Agreement to any third party. + +**6.3. Other.** This Agreement is the entire agreement between the parties regarding the subject matter hereof. No amendment or modification of this Agreement will be valid or binding upon the parties unless made in writing and signed by the duly authorized representatives of both parties. In the event that any provision, including without limitation any condition, of this Agreement is held to be unenforceable, this Agreement and all licenses and rights granted hereunder will immediately terminate. Waiver by Snowplow of a breach of any provision of this Agreement or the failure by Snowplow to exercise any right hereunder will not be construed as a waiver of any subsequent breach of that right or as a waiver of any other right. diff --git a/README.md b/README.md index 1fa1664..bda98bd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![License][license-image]][license] + # Iglu Server A RESTful schema registry, allowing users to publish, test and serve schemas via an easy-to-use RESTful interface. @@ -10,16 +12,10 @@ A RESTful schema registry, allowing users to publish, test and serve schemas via ## Copyright and license -Iglu Server is copyright 2014-2023 Snowplow Analytics Ltd. +Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. -Licensed under the **[Apache License, Version 2.0][license]** (the "License"); -you may not use this software except in compliance with the License. +Licensed under the [Snowplow Limited Use License Agreement][license]. _(If you are uncertain how it applies to your use case, check our answers to [frequently asked questions][faq].)_ -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. [techdocs-image]: https://d3i6fms1cm1j0i.cloudfront.net/github/images/techdocs.png [setup-image]: https://d3i6fms1cm1j0i.cloudfront.net/github/images/setup.png @@ -31,5 +27,6 @@ limitations under the License. [roadmap]: https://github.com/snowplow/snowplow/projects/7 [contributing]: https://docs.snowplow.io/docs/contributing/ -[license]: http://www.apache.org/licenses/LICENSE-2.0 - +[license]: https://docs.snowplow.io/limited-use-license-1.0 +[license-image]: https://img.shields.io/badge/license-Snowplow--Limited--Use-blue.svg?style=flat +[faq]: https://docs.snowplow.io/docs/contributing/limited-use-license-faq/ diff --git a/build.sbt b/build.sbt index 585eb63..3a9d30d 100644 --- a/build.sbt +++ b/build.sbt @@ -10,6 +10,7 @@ ThisBuild / libraryDependencySchemes ++= Seq( ) lazy val allSettings = BuildSettings.projectSettings ++ + BuildSettings.licenseSettings ++ BuildSettings.buildInfoSettings ++ BuildSettings.assemblySettings ++ BuildSettings.dynVerSettings ++ @@ -19,15 +20,18 @@ lazy val allSettings = BuildSettings.projectSettings ++ lazy val root = project .settings(BuildSettings.projectSettings) + .settings(BuildSettings.licenseSettings) .settings(BuildSettings.dynVerSettings) .settings(BuildSettings.compilerSettings) .aggregate(igluServer) lazy val igluServer = (project in file(".")) .settings(allSettings) + .settings(BuildSettings.additionalDockerSettings) .enablePlugins(JavaAppPackaging, BuildInfoPlugin, SnowplowDockerPlugin) lazy val igluServerDistroless = (project in file("./distroless")) .settings(allSettings) + .settings(BuildSettings.additionalDockerSettings) .settings(sourceDirectory := (igluServer / sourceDirectory).value) .enablePlugins(JavaAppPackaging, BuildInfoPlugin, SnowplowDistrolessDockerPlugin) diff --git a/project/BuildSettings.scala b/project/BuildSettings.scala index e1a1767..c311ec6 100644 --- a/project/BuildSettings.scala +++ b/project/BuildSettings.scala @@ -24,14 +24,32 @@ import sbtbuildinfo.BuildInfoPlugin.autoImport.{BuildInfoKey, buildInfoKeys, bui import com.typesafe.sbt.packager.Keys.maintainer import com.typesafe.sbt.packager.linux.LinuxPlugin.autoImport._ +import com.typesafe.sbt.SbtNativePackager.Universal + +import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport._ object BuildSettings { lazy val projectSettings = Seq( organization := "com.snowplowanalytics", name := "iglu-server", - scalaVersion := "2.12.9", - licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0.html")) + scalaVersion := "2.12.9" + ) + + lazy val licenseSettings = Seq( + licenses += ("Snowplow Limited Use License Agreement", url("https://docs.snowplow.io/limited-use-license-1.0")), + headerLicense := Some(HeaderLicense.Custom( + """|Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. + | + |This software is made available by Snowplow Analytics, Ltd., + |under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + |located at https://docs.snowplow.io/limited-use-license-1.0 + |BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + |OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. + |""".stripMargin + )), + headerMappings := headerMappings.value + (HeaderFileType.conf -> HeaderCommentStyle.hashLineComment), + Compile / unmanagedResources += file("LICENSE.md") ) lazy val buildInfoSettings = Seq( @@ -59,6 +77,10 @@ object BuildSettings { ThisBuild / dynverSeparator := "-" // to be compatible with docker ) + lazy val additionalDockerSettings = Seq( + Universal / mappings += file("LICENSE.md") -> "/SNOWPLOW-LICENSE.md" + ) + lazy val testsSettings = Seq( Global / cancelable := true, Test / parallelExecution := false // Because we have several specs that use the database diff --git a/project/plugins.sbt b/project/plugins.sbt index 4541f87..99fd934 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,3 +6,4 @@ addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("com.snowplowanalytics" % "sbt-snowplow-release" % "0.3.1") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index 158a155..ee21947 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -1,3 +1,11 @@ +# Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. +# +# This software is made available by Snowplow Analytics, Ltd., +# under the terms of the Snowplow Limited Use License Agreement, Version 1.0 +# located at https://docs.snowplow.io/limited-use-license-1.0 +# BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION +# OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. + "iglu": { "repoServer": { diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala b/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala index f53e103..f52a1ef 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server import java.nio.file.Path diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/Main.scala b/src/main/scala/com/snowplowanalytics/iglu/server/Main.scala index f072400..0f3a7a4 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/Main.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/Main.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server import cats.data.EitherT diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/Server.scala b/src/main/scala/com/snowplowanalytics/iglu/server/Server.scala index b837edc..256ab36 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/Server.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/Server.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server import java.util.concurrent.{ExecutorService, Executors} diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/Utils.scala b/src/main/scala/com/snowplowanalytics/iglu/server/Utils.scala index 112277e..2b20384 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/Utils.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/Utils.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server import io.circe.Encoder diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/Webhook.scala b/src/main/scala/com/snowplowanalytics/iglu/server/Webhook.scala index f9e1728..e91856f 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/Webhook.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/Webhook.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server import cats.effect.BracketThrow diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/codecs/JsonCodecs.scala b/src/main/scala/com/snowplowanalytics/iglu/server/codecs/JsonCodecs.scala index 29dc59a..b077b68 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/codecs/JsonCodecs.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/codecs/JsonCodecs.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.codecs import cats.effect.Sync diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/codecs/Swagger.scala b/src/main/scala/com/snowplowanalytics/iglu/server/codecs/Swagger.scala index 1e4f19f..9371f2e 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/codecs/Swagger.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/codecs/Swagger.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package codecs diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/codecs/UriParsers.scala b/src/main/scala/com/snowplowanalytics/iglu/server/codecs/UriParsers.scala index ecc5815..e6db3dd 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/codecs/UriParsers.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/codecs/UriParsers.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package codecs diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/codecs/package.scala b/src/main/scala/com/snowplowanalytics/iglu/server/codecs/package.scala index 9e3f94f..d0cdf65 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/codecs/package.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/codecs/package.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server /** Package containing implicit entities, allowing to encode and decode various HTTP entities */ diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/middleware/BadRequestHandler.scala b/src/main/scala/com/snowplowanalytics/iglu/server/middleware/BadRequestHandler.scala index be216bb..b79d3f0 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/middleware/BadRequestHandler.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/middleware/BadRequestHandler.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.middleware import cats.data.{Kleisli, OptionT} diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/middleware/CachingMiddleware.scala b/src/main/scala/com/snowplowanalytics/iglu/server/middleware/CachingMiddleware.scala index affcc7a..c017ca3 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/middleware/CachingMiddleware.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/middleware/CachingMiddleware.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.middleware import cats.Applicative diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/middleware/PermissionMiddleware.scala b/src/main/scala/com/snowplowanalytics/iglu/server/middleware/PermissionMiddleware.scala index df7f8bd..fba2ab6 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/middleware/PermissionMiddleware.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/middleware/PermissionMiddleware.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package middleware diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/migrations/Bootstrap.scala b/src/main/scala/com/snowplowanalytics/iglu/server/migrations/Bootstrap.scala index e6d3800..5ede1b4 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/migrations/Bootstrap.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/migrations/Bootstrap.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.migrations import cats.effect.Bracket diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/migrations/Fifth.scala b/src/main/scala/com/snowplowanalytics/iglu/server/migrations/Fifth.scala index 1f3b2f1..ea39f28 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/migrations/Fifth.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/migrations/Fifth.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package migrations diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/migrations/MigrateFrom.scala b/src/main/scala/com/snowplowanalytics/iglu/server/migrations/MigrateFrom.scala index 5568e1f..19f27e0 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/migrations/MigrateFrom.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/migrations/MigrateFrom.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.migrations import doobie.free.connection.ConnectionIO diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/model/IgluResponse.scala b/src/main/scala/com/snowplowanalytics/iglu/server/model/IgluResponse.scala index 96bb7a4..87b09cc 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/model/IgluResponse.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/model/IgluResponse.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.model import java.util.UUID diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/model/Permission.scala b/src/main/scala/com/snowplowanalytics/iglu/server/model/Permission.scala index 61f429f..3146132 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/model/Permission.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/model/Permission.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package model diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/model/Schema.scala b/src/main/scala/com/snowplowanalytics/iglu/server/model/Schema.scala index 7375ce3..6e85d5e 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/model/Schema.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/model/Schema.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.model import java.time.Instant diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/model/SchemaDraft.scala b/src/main/scala/com/snowplowanalytics/iglu/server/model/SchemaDraft.scala index a3fc298..e8f637e 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/model/SchemaDraft.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/model/SchemaDraft.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package model diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/model/VersionCursor.scala b/src/main/scala/com/snowplowanalytics/iglu/server/model/VersionCursor.scala index 876bbb7..00bef40 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/model/VersionCursor.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/model/VersionCursor.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.model import cats.Show diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/model/package.scala b/src/main/scala/com/snowplowanalytics/iglu/server/model/package.scala index 7625070..558b4e1 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/model/package.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/model/package.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server import eu.timepit.refined.types.numeric.NonNegInt diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/service/AuthService.scala b/src/main/scala/com/snowplowanalytics/iglu/server/service/AuthService.scala index c95e93a..aca6e38 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/service/AuthService.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/service/AuthService.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package service diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/service/DebugService.scala b/src/main/scala/com/snowplowanalytics/iglu/server/service/DebugService.scala index a41f297..6a57e80 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/service/DebugService.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/service/DebugService.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.service import cats.effect.{IO, Sync} diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/service/DraftService.scala b/src/main/scala/com/snowplowanalytics/iglu/server/service/DraftService.scala index e55fc37..f180845 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/service/DraftService.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/service/DraftService.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.service import java.util.UUID diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/service/MetaService.scala b/src/main/scala/com/snowplowanalytics/iglu/server/service/MetaService.scala index 1777219..b50dd28 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/service/MetaService.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/service/MetaService.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.service import java.util.UUID diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/service/SchemaService.scala b/src/main/scala/com/snowplowanalytics/iglu/server/service/SchemaService.scala index 03ca8aa..cd02ac2 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/service/SchemaService.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/service/SchemaService.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package service diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/service/StaticService.scala b/src/main/scala/com/snowplowanalytics/iglu/server/service/StaticService.scala index 465b07e..d445558 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/service/StaticService.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/service/StaticService.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.service import cats.effect.{Blocker, ContextShift, IO} diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/service/ValidationService.scala b/src/main/scala/com/snowplowanalytics/iglu/server/service/ValidationService.scala index 2e0e536..827b49a 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/service/ValidationService.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/service/ValidationService.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.service import java.util.UUID diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/storage/InMemory.scala b/src/main/scala/com/snowplowanalytics/iglu/server/storage/InMemory.scala index cb5bb9a..48bac32 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/storage/InMemory.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/storage/InMemory.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.storage import java.util.UUID diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/storage/Postgres.scala b/src/main/scala/com/snowplowanalytics/iglu/server/storage/Postgres.scala index 736a1e5..fd898f4 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/storage/Postgres.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/storage/Postgres.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package storage diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/storage/Storage.scala b/src/main/scala/com/snowplowanalytics/iglu/server/storage/Storage.scala index 5e8f82f..716a4b5 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/storage/Storage.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/storage/Storage.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package storage diff --git a/src/test/resources/valid-dummy-config.conf b/src/test/resources/valid-dummy-config.conf index b07a426..e97840b 100644 --- a/src/test/resources/valid-dummy-config.conf +++ b/src/test/resources/valid-dummy-config.conf @@ -1,15 +1,10 @@ -# Copyright (c) 2014-2023 Snowplow Analytics Ltd. All rights reserved. +# Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. # -# This program is licensed to you under the Apache License Version 2.0, and -# you may not use this file except in compliance with the Apache License -# Version 2.0. You may obtain a copy of the Apache License Version 2.0 at -# http://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the Apache License Version 2.0 is distributed on an "AS -# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. See the Apache License Version 2.0 for the specific language -# governing permissions and limitations there under. +# This software is made available by Snowplow Analytics, Ltd., +# under the terms of the Snowplow Limited Use License Agreement, Version 1.0 +# located at https://docs.snowplow.io/limited-use-license-1.0 +# BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION +# OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. # This file (application.conf) contains all necessary configuration options for the Iglu Server. diff --git a/src/test/resources/valid-pg-config.conf b/src/test/resources/valid-pg-config.conf index 79ce129..22ffc52 100644 --- a/src/test/resources/valid-pg-config.conf +++ b/src/test/resources/valid-pg-config.conf @@ -1,15 +1,10 @@ -# Copyright (c) 2014-2023 Snowplow Analytics Ltd. All rights reserved. +# Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. # -# This program is licensed to you under the Apache License Version 2.0, and -# you may not use this file except in compliance with the Apache License -# Version 2.0. You may obtain a copy of the Apache License Version 2.0 at -# http://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the Apache License Version 2.0 is distributed on an "AS -# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. See the Apache License Version 2.0 for the specific language -# governing permissions and limitations there under. +# This software is made available by Snowplow Analytics, Ltd., +# under the terms of the Snowplow Limited Use License Agreement, Version 1.0 +# located at https://docs.snowplow.io/limited-use-license-1.0 +# BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION +# OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. # This file (application.conf) contains all necessary configuration options for the Iglu Server. diff --git a/src/test/resources/valid-pg-minimal.conf b/src/test/resources/valid-pg-minimal.conf index a6e035f..9b73152 100644 --- a/src/test/resources/valid-pg-minimal.conf +++ b/src/test/resources/valid-pg-minimal.conf @@ -1,15 +1,10 @@ -# Copyright (c) 2014-2023 Snowplow Analytics Ltd. All rights reserved. +# Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. # -# This program is licensed to you under the Apache License Version 2.0, and -# you may not use this file except in compliance with the Apache License -# Version 2.0. You may obtain a copy of the Apache License Version 2.0 at -# http://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the Apache License Version 2.0 is distributed on an "AS -# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. See the Apache License Version 2.0 for the specific language -# governing permissions and limitations there under. +# This software is made available by Snowplow Analytics, Ltd., +# under the terms of the Snowplow Limited Use License Agreement, Version 1.0 +# located at https://docs.snowplow.io/limited-use-license-1.0 +# BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION +# OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. # This file (application.conf) contains all necessary configuration options for the Iglu Server. diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala index 2d44638..792ccba 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server import java.nio.file.Paths diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala index a7ff651..e1d23f3 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server import cats.implicits._ diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/SpecHelpers.scala b/src/test/scala/com/snowplowanalytics/iglu/server/SpecHelpers.scala index 7578068..7465667 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/SpecHelpers.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/SpecHelpers.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server import java.util.UUID diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/WebhookSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/WebhookSpec.scala index 7b5c08e..7e9ab74 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/WebhookSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/WebhookSpec.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server import cats.implicits._ diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/model/PermissionSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/model/PermissionSpec.scala index 5e0c418..d87e4a7 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/model/PermissionSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/model/PermissionSpec.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.model import com.snowplowanalytics.iglu.server.model.Permission.{KeyAction, SchemaAction, Vendor} diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/model/SchemaSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/model/SchemaSpec.scala index 832315e..83782ee 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/model/SchemaSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/model/SchemaSpec.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.model import java.time.Instant diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/model/VersionCursorSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/model/VersionCursorSpec.scala index 55ac4d7..416cd5f 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/model/VersionCursorSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/model/VersionCursorSpec.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server.model import com.snowplowanalytics.iglu.core.SchemaVer diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/service/AuthServiceSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/service/AuthServiceSpec.scala index a243d2b..a6b3eb5 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/service/AuthServiceSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/service/AuthServiceSpec.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package service diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/service/SchemaServiceSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/service/SchemaServiceSpec.scala index 6ceb53f..9fc546c 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/service/SchemaServiceSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/service/SchemaServiceSpec.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package service diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/service/StorageAgnosticSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/service/StorageAgnosticSpec.scala index 5a7b8fa..45399ba 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/service/StorageAgnosticSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/service/StorageAgnosticSpec.scala @@ -1,3 +1,13 @@ +/* + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. + * + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. + */ + package com.snowplowanalytics.iglu.server.service import cats.implicits._ diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/service/SupersedingLogicSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/service/SupersedingLogicSpec.scala index 98e9d59..5b261ac 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/service/SupersedingLogicSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/service/SupersedingLogicSpec.scala @@ -1,3 +1,13 @@ +/* + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. + * + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. + */ + package com.snowplowanalytics.iglu.server.service import cats.effect.IO diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/service/ValidationServiceSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/service/ValidationServiceSpec.scala index d7398e4..a1e4d85 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/service/ValidationServiceSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/service/ValidationServiceSpec.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package service diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/storage/PostgresSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/storage/PostgresSpec.scala index 93373f3..83feffb 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/storage/PostgresSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/storage/PostgresSpec.scala @@ -1,17 +1,13 @@ /* - * Copyright (c) 2019-2023 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2014-present Snowplow Analytics Ltd. All rights reserved. * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and - * limitations there under. + * This software is made available by Snowplow Analytics, Ltd., + * under the terms of the Snowplow Limited Use License Agreement, Version 1.0 + * located at https://docs.snowplow.io/limited-use-license-1.0 + * BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY PORTION + * OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. */ + package com.snowplowanalytics.iglu.server package storage From b49e66f2cd3d786738149e85e5388128f2da83cd Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 15 Jan 2024 12:15:41 +0000 Subject: [PATCH 2/4] Add an option to send HSTS header (close #148) --- src/main/resources/application.conf | 4 + .../iglu/server/Config.scala | 18 +++-- .../iglu/server/Server.scala | 28 ++++--- src/test/resources/valid-dummy-config.conf | 4 + .../iglu/server/ConfigSpec.scala | 16 ++-- .../iglu/server/ServerSpec.scala | 75 +++++++++++++++---- 6 files changed, 105 insertions(+), 40 deletions(-) diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index ee21947..5ee411e 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -15,6 +15,10 @@ "type": "fixed" "size": 4 } + "hsts": { + "enable": false + "maxAge": "365 days" + } } "database" { diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala b/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala index f52a1ef..c98e455 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala @@ -12,15 +12,11 @@ package com.snowplowanalytics.iglu.server import java.nio.file.Path import java.util.UUID - import cats.implicits._ - import com.monovore.decline._ - import io.circe.{Encoder, Json, JsonObject} import io.circe.syntax._ import io.circe.generic.semiauto._ - import pureconfig._ import pureconfig.generic.ProductHint import pureconfig.generic.semiauto._ @@ -28,7 +24,6 @@ import pureconfig.module.http4s._ import migrations.MigrateFrom import scala.concurrent.duration.FiniteDuration - import generated.BuildInfo.version /** @@ -217,12 +212,21 @@ object Config { port: Int, idleTimeout: Option[FiniteDuration], maxConnections: Option[Int], - threadPool: ThreadPool + threadPool: ThreadPool, + hsts: Config.Hsts ) implicit val httpConfigCirceEncoder: Encoder[Http] = deriveEncoder[Http] + case class Hsts( + enable: Boolean, + maxAge: FiniteDuration + ) + + implicit val hstsConfigCirceEncoder: Encoder[Hsts] = + deriveEncoder[Hsts] + implicit val pureWebhookReader: ConfigReader[Webhook] = ConfigReader.fromCursor { cur => for { objCur <- cur.asObjectCursor @@ -258,6 +262,8 @@ object Config { implicit val pureHttpReader: ConfigReader[Http] = deriveReader[Http] + implicit val pureHstsReader: ConfigReader[Hsts] = deriveReader[Hsts] + implicit val pureWebhooksReader: ConfigReader[List[Webhook]] = ConfigReader.fromCursor { cur => for { objCur <- cur.asObjectCursor diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/Server.scala b/src/main/scala/com/snowplowanalytics/iglu/server/Server.scala index 256ab36..5930818 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/Server.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/Server.scala @@ -12,47 +12,37 @@ package com.snowplowanalytics.iglu.server import java.util.concurrent.{ExecutorService, Executors} import java.util.UUID - import scala.concurrent.duration._ import scala.concurrent.ExecutionContext - import cats.data.Kleisli import cats.effect.{Blocker, ContextShift, ExitCase, ExitCode, IO, Resource, Sync, Timer} import cats.effect.concurrent.Ref - import io.circe.syntax._ - import org.typelevel.log4cats.slf4j.Slf4jLogger - import fs2.Stream import fs2.concurrent.SignallingRef - import org.http4s.{Headers, HttpApp, HttpRoutes, MediaType, Method, Request, Response, Status} -import org.http4s.headers.`Content-Type` +import org.http4s.headers.{`Content-Type`, `Strict-Transport-Security`} import org.http4s.client.blaze.BlazeClientBuilder import org.http4s.server.Router import org.http4s.server.blaze.BlazeServerBuilder -import org.http4s.server.middleware.{AutoSlash, CORS, Logger} +import org.http4s.server.middleware.{AutoSlash, CORS, HSTS, Logger} import org.http4s.syntax.string._ import org.http4s.server.{defaults => Http4sDefaults} import org.http4s.util.{CaseInsensitiveString => CIString} - import org.http4s.rho.{AuthedContext, RhoMiddleware} import org.http4s.rho.bits.PathAST.{PathMatch, TypedPath} import org.http4s.rho.swagger.syntax.{io => ioSwagger} import org.http4s.rho.swagger.models.{ApiKeyAuthDefinition, In, Info, SecurityRequirement} import org.http4s.rho.swagger.SwaggerMetadata - import doobie.implicits._ import doobie.util.transactor.Transactor - import com.snowplowanalytics.iglu.server.migrations.{Bootstrap, MigrateFrom} import com.snowplowanalytics.iglu.server.codecs.Swagger import com.snowplowanalytics.iglu.server.middleware.{BadRequestHandler, CachingMiddleware} import com.snowplowanalytics.iglu.server.model.{IgluResponse, Permission} import com.snowplowanalytics.iglu.server.storage.Storage import com.snowplowanalytics.iglu.server.service._ - import generated.BuildInfo.version object Server { @@ -102,13 +92,20 @@ object Server { cache: CachingMiddleware.ResponseCache[IO], swaggerConfig: Config.Swagger, blocker: Blocker, - isHealthy: IO[Boolean] + isHealthy: IO[Boolean], + hsts: Config.Hsts )(implicit cs: ContextShift[IO]): HttpApp[IO] = { val serverRoutes = httpRoutes(storage, superKey, debug, patchesAllowed, webhook, cache, swaggerConfig, blocker, isHealthy) - Kleisli[IO, Request[IO], Response[IO]](req => Router(serverRoutes: _*).run(req).getOrElse(NotFound)) + val server = Kleisli[IO, Request[IO], Response[IO]](req => Router(serverRoutes: _*).run(req).getOrElse(NotFound)) + hstsMiddleware(hsts)(server) } + def hstsMiddleware(hsts: Config.Hsts): HttpApp[IO] => HttpApp[IO] = + if (hsts.enable) + HSTS(_, `Strict-Transport-Security`.unsafeFromDuration(hsts.maxAge)) + else identity + def httpRoutes( storage: Storage[IO], superKey: Option[UUID], @@ -187,7 +184,8 @@ object Server { cache, config.swagger, blocker, - isHealthy + isHealthy, + config.repoServer.hsts ) ) .withIdleTimeout(config.repoServer.idleTimeout.getOrElse(Http4sDefaults.IdleTimeout)) diff --git a/src/test/resources/valid-dummy-config.conf b/src/test/resources/valid-dummy-config.conf index e97840b..0d135fd 100644 --- a/src/test/resources/valid-dummy-config.conf +++ b/src/test/resources/valid-dummy-config.conf @@ -17,6 +17,10 @@ repoServer { type = "fixed" size = 2 } + hsts { + enable = true + maxAge = "365 days" + } } # 'postgres' contains configuration options for the postgre instance the server is using diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala index 792ccba..6fb500f 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala @@ -31,6 +31,8 @@ class ConfigSpec extends org.specs2.Specification { parse minimal config with dummy DB from file $e5 """ + val noHsts = Config.Hsts(enable = false, maxAge = 365.days) + def e1 = { val input = "--config foo.hocon" val expected = Config.ServerCommand.Run(Some(Paths.get("foo.hocon"))) @@ -67,7 +69,7 @@ class ConfigSpec extends org.specs2.Specification { pool, false ), - Config.Http("0.0.0.0", 8080, Some(10.seconds), None, Config.ThreadPool.Global), + Config.Http("0.0.0.0", 8080, Some(10.seconds), None, Config.ThreadPool.Global, noHsts), true, true, List( @@ -95,7 +97,7 @@ class ConfigSpec extends org.specs2.Specification { val expected = Config( Config.StorageConfig.Dummy, - Config.Http("0.0.0.0", 8080, None, None, Config.ThreadPool.Fixed(2)), + Config.Http("0.0.0.0", 8080, None, None, Config.ThreadPool.Fixed(2), Config.Hsts(true, 365.days)), true, false, Nil, @@ -123,7 +125,7 @@ class ConfigSpec extends org.specs2.Specification { Config.StorageConfig.ConnectionPool.NoPool(Config.ThreadPool.Fixed(2)), true ), - Config.Http("0.0.0.0", 8080, None, None, Config.ThreadPool.Global), + Config.Http("0.0.0.0", 8080, None, None, Config.ThreadPool.Global, noHsts), true, true, List( @@ -163,7 +165,11 @@ class ConfigSpec extends org.specs2.Specification { "port" : 8080, "idleTimeout": null, "maxConnections": null, - "threadPool": "global" + "threadPool": "global", + "hsts": { + "enable": false, + "maxAge": "365 days" + } }, "debug" : true, "patchesAllowed" : true, @@ -218,7 +224,7 @@ class ConfigSpec extends org.specs2.Specification { pool, true ), - Config.Http("0.0.0.0", 8080, None, None, Config.ThreadPool.Fixed(4)), + Config.Http("0.0.0.0", 8080, None, None, Config.ThreadPool.Fixed(4), noHsts), false, false, Nil, diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala index e1d23f3..e533af7 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala @@ -20,6 +20,7 @@ import org.http4s._ import org.http4s.implicits._ import org.http4s.circe._ import org.http4s.client.blaze.BlazeClientBuilder +import org.http4s.headers.`Strict-Transport-Security` import org.specs2.Specification @@ -42,6 +43,7 @@ class ServerSpec extends Specification { Return 404 for unknown endpoint $e2 Create a new private schema via PUT, return it with proper apikey, hide for no apikey $e3 Create a new public schema via POST, get it from /schemas, delete it $e4 + Return an HSTS header when configured to do so $e5 ${action(System.clearProperty("org.slf4j.simpleLogger.defaultLogLevel"))} """ import ServerSpec._ @@ -136,6 +138,46 @@ class ServerSpec extends Specification { execute(action) must beEqualTo(expected) } + + def e5 = { + val schema = SelfDescribingSchema[Json]( + SchemaMap("com.acme", "first", "jsonschema", SchemaVer.Full(1, 0, 0)), + json"""{"properties": {}}""" + ).normalize + + val reqs = List( + Request[IO](Method.POST, uri"/".withQueryParam("isPublic", "true")) + .withEntity(schema) + .withHeaders(Header("apikey", InMemory.DummySuperKey.toString)), + Request[IO](Method.DELETE, uri"/com.acme/first/jsonschema/1-0-0") + .withHeaders(Header("apikey", InMemory.DummySuperKey.toString)), + Request[IO](Method.GET, uri"/"), + Request[IO](Method.GET, uri"/nonExistingEndpoint") + ) + + val expected = Some( + List( + `Strict-Transport-Security`.unsafeFromLong(180 * 24 * 3600, includeSubDomains = true), + `Strict-Transport-Security`.unsafeFromLong(180 * 24 * 3600, includeSubDomains = true), + `Strict-Transport-Security`.unsafeFromLong(180 * 24 * 3600, includeSubDomains = true), + `Strict-Transport-Security`.unsafeFromLong(180 * 24 * 3600, includeSubDomains = true) + ) + ) + + def action(hsts: Config.Hsts) = + for { + responses <- ServerSpec.executeRequests(reqs, hsts) + results = responses.traverse(res => res.headers.get(`Strict-Transport-Security`)) + } yield results + + val hstsOn = Config.Hsts(enable = true, 180.days) + val hstsOff = Config.Hsts(enable = false, 365.days) + + val on = execute(action(hstsOn), hstsOn) must beEqualTo(expected) + val off = execute(action(hstsOff), hstsOff) must beEqualTo(None) + + on.and(off) + } } object ServerSpec { @@ -147,7 +189,7 @@ object ServerSpec { .StorageConfig .ConnectionPool .Hikari(None, None, None, None, Config.ThreadPool.Cached, Config.ThreadPool.Cached) - val httpConfig = Config.Http("0.0.0.0", 8080, None, None, Config.ThreadPool.Cached) + def httpConfig(hsts: Config.Hsts) = Config.Http("0.0.0.0", 8080, None, None, Config.ThreadPool.Cached, hsts) val storageConfig = Config .StorageConfig @@ -162,29 +204,34 @@ object ServerSpec { dbPoolConfig, true ) - val config = Config(storageConfig, httpConfig, false, true, Nil, Config.Swagger(""), None, 10.seconds, false) + def config(hsts: Config.Hsts) = + Config(storageConfig, httpConfig(hsts), false, true, Nil, Config.Swagger(""), None, 10.seconds, false) - private val runServer = Server.buildServer(config, IO.pure(true)).flatMap(_.resource) - private val client = BlazeClientBuilder[IO](global).resource - private val env = client <* runServer + private def runServer(hsts: Config.Hsts) = Server.buildServer(config(hsts), IO.pure(true)).flatMap(_.resource) + private val client = BlazeClientBuilder[IO](global).resource + private def env(hsts: Config.Hsts) = client <* runServer(hsts) /** Execute requests against fresh server (only one execution per test is allowed) */ - def executeRequests(requests: List[Request[IO]]): IO[List[Response[IO]]] = { + def executeRequests( + requests: List[Request[IO]], + hsts: Config.Hsts = Config.Hsts(false, 365.days) + ): IO[List[Response[IO]]] = { val r = requests.map { r => if (r.uri.host.isDefined) r else r.withUri(uri"http://localhost:8080/api/schemas".addPath(r.uri.path)) } - env.use(client => r.traverse(client.run(_).use(IO.pure))) + env(hsts).use(client => r.traverse(client.run(_).use(IO.pure))) } - val specification = Resource.make { - Storage.initialize[IO](storageConfig).use(s => s.asInstanceOf[Postgres[IO]].drop) *> - Server.setup(ServerSpec.config, None).void *> - Storage.initialize[IO](storageConfig).use(_.addPermission(InMemory.DummySuperKey, Permission.Super)) - }(_ => Storage.initialize[IO](storageConfig).use(s => s.asInstanceOf[Postgres[IO]].drop)) + def specification(hsts: Config.Hsts) = + Resource.make { + Storage.initialize[IO](storageConfig).use(s => s.asInstanceOf[Postgres[IO]].drop) *> + Server.setup(ServerSpec.config(hsts), None).void *> + Storage.initialize[IO](storageConfig).use(_.addPermission(InMemory.DummySuperKey, Permission.Super)) + }(_ => Storage.initialize[IO](storageConfig).use(s => s.asInstanceOf[Postgres[IO]].drop)) - def execute[A](action: IO[A]): A = - specification.use(_ => action).unsafeRunSync() + def execute[A](action: IO[A], hsts: Config.Hsts = Config.Hsts(false, 365.days)): A = + specification(hsts).use(_ => action).unsafeRunSync() case class TestResponse[E](status: Int, body: E) From eea3fc003372b09a3e26c2c645daa404aef6e358 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 19 Jan 2024 17:11:36 +0000 Subject: [PATCH 3/4] Add mandatory SLULA acceptance flag (#150) --- config/config.minimal.hocon | 5 +++ config/config.reference.hocon | 5 +++ src/main/resources/application.conf | 5 +++ .../iglu/server/Config.scala | 33 ++++++++++++++++--- .../snowplowanalytics/iglu/server/Main.scala | 8 +++++ src/test/resources/valid-dummy-config.conf | 3 ++ .../iglu/server/ConfigSpec.scala | 17 +++++++--- .../iglu/server/ServerSpec.scala | 13 +++++++- 8 files changed, 79 insertions(+), 10 deletions(-) diff --git a/config/config.minimal.hocon b/config/config.minimal.hocon index 7bc90a2..a8ef7a4 100644 --- a/config/config.minimal.hocon +++ b/config/config.minimal.hocon @@ -1,4 +1,9 @@ { + # Full license text available in LICENSE.md + "license": { + "accept": true + } + "database": { "host": "postgres" "dbname": "igludb" diff --git a/config/config.reference.hocon b/config/config.reference.hocon index f79e9a4..6009de7 100644 --- a/config/config.reference.hocon +++ b/config/config.reference.hocon @@ -1,4 +1,9 @@ { + # Full license text available in LICENSE.md + "license": { + "accept": true + } + # Http server settings "repoServer": { "interface": "0.0.0.0" diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index 5ee411e..8ef932d 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -8,6 +8,11 @@ "iglu": { + "license": { + "accept": false + "accept": ${?ACCEPT_LIMITED_USE_LICENSE} + } + "repoServer": { "interface": "0.0.0.0" "port": 8080 diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala b/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala index c98e455..c8a66d4 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/Config.scala @@ -50,7 +50,8 @@ case class Config( swagger: Config.Swagger, superApiKey: Option[UUID], preTerminationPeriod: FiniteDuration, - preTerminationUnhealthy: Boolean + preTerminationUnhealthy: Boolean, + license: Config.License ) object Config { @@ -61,9 +62,12 @@ object Config { implicitly[Encoder[String]].contramap(_.toString) sealed trait ThreadPool extends Product with Serializable + object ThreadPool { - case object Global extends ThreadPool - case object Cached extends ThreadPool + case object Global extends ThreadPool + + case object Cached extends ThreadPool + case class Fixed(size: Int) extends ThreadPool implicit val threadPoolReader: ConfigReader[ThreadPool] = @@ -102,12 +106,15 @@ object Config { } sealed trait StorageConfig + object StorageConfig { /** Frequently used HikariCP settings */ sealed trait ConnectionPool extends Product with Serializable + object ConnectionPool { case class NoPool(threadPool: ThreadPool) extends ConnectionPool + case class Hikari( connectionTimeout: Option[FiniteDuration], maxLifetime: Option[FiniteDuration], @@ -205,7 +212,7 @@ object Config { * Configuration options for the Iglu server. * * @param interface The server's host. - * @param port The server's port. + * @param port The server's port. */ case class Http( interface: String, @@ -227,6 +234,13 @@ object Config { implicit val hstsConfigCirceEncoder: Encoder[Hsts] = deriveEncoder[Hsts] + case class License( + accept: Boolean + ) + + implicit val licenseConfigEncoder: Encoder[License] = + deriveEncoder[License] + implicit val pureWebhookReader: ConfigReader[Webhook] = ConfigReader.fromCursor { cur => for { objCur <- cur.asObjectCursor @@ -272,6 +286,17 @@ object Config { } yield webhooks } + implicit val pureLicenseReader: ConfigReader[License] = { + val truthy = Set("true", "yes", "on", "1") + ConfigReader.fromCursor { cur => + for { + objCur <- cur.asObjectCursor + acceptCur <- objCur.atKey("accept") + value <- acceptCur.asString + } yield License(truthy(value.toLowerCase)) + } + } + implicit val pureConfigReader: ConfigReader[Config] = deriveReader[Config] implicit val mainConfigCirceEncoder: Encoder[Config] = diff --git a/src/main/scala/com/snowplowanalytics/iglu/server/Main.scala b/src/main/scala/com/snowplowanalytics/iglu/server/Main.scala index 0f3a7a4..879dad0 100644 --- a/src/main/scala/com/snowplowanalytics/iglu/server/Main.scala +++ b/src/main/scala/com/snowplowanalytics/iglu/server/Main.scala @@ -20,6 +20,7 @@ object Main extends IOApp { val cli = for { command <- EitherT.fromEither[IO](Config.serverCommand.parse(args).leftMap(_.toString)) config <- EitherT.fromEither[IO](command.read) + _ <- EitherT.fromEither[IO](checkLicense(config)) result <- command match { case _: Config.ServerCommand.Run => EitherT.liftF[IO, String, ExitCode](Server.run(config)) @@ -33,4 +34,11 @@ object Main extends IOApp { case Left(cliError) => IO(System.err.println(cliError)).as(ExitCode.Error) } } + + def checkLicense(config: Config): Either[String, Unit] = + if (config.license.accept) Right(()) + else + Left( + "Please accept the terms of the Snowplow Limited Use License Agreement to proceed. See https://docs.snowplow.io/docs/pipeline-components-and-applications/iglu/iglu-repositories/iglu-server/reference/#license for more information on the license and how to configure this." + ) } diff --git a/src/test/resources/valid-dummy-config.conf b/src/test/resources/valid-dummy-config.conf index 0d135fd..3101607 100644 --- a/src/test/resources/valid-dummy-config.conf +++ b/src/test/resources/valid-dummy-config.conf @@ -7,6 +7,9 @@ # OF THE SOFTWARE, YOU AGREE TO THE TERMS OF SUCH LICENSE AGREEMENT. # This file (application.conf) contains all necessary configuration options for the Iglu Server. +license { + accept = yes +} # 'repoServer' contains configuration options for the repoServer - # interface and port on which the server will be running diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala index 6fb500f..b7104bc 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/ConfigSpec.scala @@ -84,7 +84,8 @@ class ConfigSpec extends org.specs2.Specification { Config.Swagger("/custom/prefix"), None, 42.seconds, - true + true, + Config.License(false) ) val result = Config.serverCommand.parse(input.split(" ").toList).leftMap(_.toString).flatMap(_.read) result must beRight(expected) @@ -104,7 +105,8 @@ class ConfigSpec extends org.specs2.Specification { Config.Swagger(""), None, 1.seconds, - false + false, + Config.License(true) ) val result = Config.serverCommand.parse(input.split(" ").toList).leftMap(_.toString).flatMap(_.read) result must beRight(expected) @@ -139,7 +141,8 @@ class ConfigSpec extends org.specs2.Specification { Config.Swagger("/custom/prefix"), Some(UUID.fromString("a71aa7d9-6cde-40f7-84b1-046d65dedf9e")), 10.seconds, - true + true, + Config.License(true) ) val expected = json"""{ @@ -199,7 +202,10 @@ class ConfigSpec extends org.specs2.Specification { }, "superApiKey": "******", "preTerminationPeriod": "10 seconds", - "preTerminationUnhealthy": true + "preTerminationUnhealthy": true, + "license": { + "accept": true + } }""" input.asJson must beEqualTo(expected) @@ -231,7 +237,8 @@ class ConfigSpec extends org.specs2.Specification { Config.Swagger(""), None, 1.seconds, - false + false, + Config.License(false) ) val result = Config.serverCommand.parse(input.split(" ").toList).leftMap(_.toString).flatMap(_.read) result must beRight(expected) diff --git a/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala b/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala index e533af7..b81149d 100644 --- a/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala +++ b/src/test/scala/com/snowplowanalytics/iglu/server/ServerSpec.scala @@ -205,7 +205,18 @@ object ServerSpec { true ) def config(hsts: Config.Hsts) = - Config(storageConfig, httpConfig(hsts), false, true, Nil, Config.Swagger(""), None, 10.seconds, false) + Config( + storageConfig, + httpConfig(hsts), + false, + true, + Nil, + Config.Swagger(""), + None, + 10.seconds, + false, + Config.License(true) + ) private def runServer(hsts: Config.Hsts) = Server.buildServer(config(hsts), IO.pure(true)).flatMap(_.resource) private val client = BlazeClientBuilder[IO](global).resource From cf3d9c5dd6e92a45d04fdff18d3b9a58e4c0d695 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 24 Jan 2024 11:35:14 +0000 Subject: [PATCH 4/4] Prepare for 0.12.0 release --- CHANGELOG | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index f2cc93a..876dfa2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +Version 0.12.0 (2024-01-24) +--------------------------- +Add mandatory SLULA acceptance flag (#150) +Add an option to send HSTS header (#148) +Update the license to SLULA (#150) + Version 0.11.0 (2023-10-18) -------------------------- Include 'supersedes' field to schema output (close #144)