There is a security vulnerability in SSH key-generation using GitKraken < v8.0.1. If you used this tool to create SSH keys, please update GitKraken and regenerate. If you need help with this, contact forum-support@opengroup.org

Commit 09631973 authored by Aman Verma's avatar Aman Verma
Browse files

Adding azure provider, along with UTs

parent badec4d1
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" default="false" project-jdk-name="14" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="b1eee2a6-e124-451b-a2a5-7182629db9d4" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1f5GPGJSkQyNlnZVih93ViGvX0x" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="b1eee2a6-e124-451b-a2a5-7182629db9d4" name="Default Changelist" comment="" />
<created>1595500513465</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1595500513465</updated>
</task>
<servers />
</component>
</project>
\ No newline at end of file
......@@ -42,6 +42,7 @@
<module>schema-core</module>
<module>provider/schema-gcp</module>
<module>provider/schema-ibm</module>
<module>provider/schema-azure</module>
</modules>
<repositories>
<repository>
......
##
# Needed to run the service
##
export LOG_PREFIX=
export AUTHORIZE_API=
export AUTHORIZE_API_KEY=
export azure.application-insights.instrumentation-key=
export azure.activedirectory.client-id=
export azure.activedirectory.AppIdUri=
export azure.activedirectory.session-stateless=
export cosmosdb_account=
export cosmosdb_key=
export cosmosdb_database=
export azure.storage.account-name=
export azure.storage.enable-https=
export servicebus_topic_name=
export servicebus_namespace_name=
export KEYVAULT_URI=
export AZURE_CLIENT_ID=
export AZURE_TENANT_ID=
export AZURE_CLIENT_SECRET=
export search_service_endpoint=
##
# Needed to run the integration tests
##
export AZURE_AD_APP_RESOURCE_ID=
export AZURE_AD_TENANT_ID=
export DEPLOY_ENV=
export DOMAIN=
export INTEGRATION_TESTER=
export LEGAL_URL=
export NO_DATA_ACCESS_TESTER=
export NO_DATA_ACCESS_TESTER_SERVICEPRINCIPAL_SECRET=
export PUBSUB_TOKEN=
export STORAGE_URL=
export TENANT_NAME=
export TESTER_SERVICEPRINCIPAL_SECRET=
# os-storage-azure
os-storage-azure is a [Spring Boot](https://spring.io/projects/spring-boot) service that hosts CRUD APIs that enable management of storage schemas and records within the OSDU R2 ecosystem.
## Running Locally
### Requirements
In order to run this service locally, you will need the following:
- [Maven 3.6.0+](https://maven.apache.org/download.cgi)
- [AdoptOpenJDK8](https://adoptopenjdk.net/)
- Infrastructure dependencies, deployable through the relevant [infrastructure template](https://dev.azure.com/slb-des-ext-collaboration/open-data-ecosystem/_git/infrastructure-templates?path=%2Finfra&version=GBmaster&_a=contents)
- While not a strict dependency, example commands in this document use [bash](https://www.gnu.org/software/bash/)
### General Tips
**Environment Variable Management**
The following tools make environment variable configuration simpler
- [direnv](https://direnv.net/) - for a shell/terminal environment
- [EnvFile](https://plugins.jetbrains.com/plugin/7861-envfile) - for [Intellij IDEA](https://www.jetbrains.com/idea/)
**Lombok**
This project uses [Lombok](https://projectlombok.org/) for code generation. You may need to configure your IDE to take advantage of this tool.
- [Intellij configuration](https://projectlombok.org/setup/intellij)
- [VSCode configuration](https://projectlombok.org/setup/vscode)
### Environment Variables
In order to run the service locally, you will need to have the following environment variables defined.
**Note** The following command can be useful to pull secrets from keyvault:
```bash
az keyvault secret show --vault-name $KEY_VAULT_NAME --name $KEY_VAULT_SECRET_NAME --query value -otsv
```
**Required to run service**
| name | value | description | sensitive? | source |
| --- | --- | --- | --- | --- |
| `LOG_PREFIX` | `storage` | Logging prefix | no | - |
| `AUTHORIZE_API` | ex `https://foo-entitlements.azurewebsites.net` | Entitlements API endpoint | no | output of infrastructure deployment |
| `AUTHORIZE_API_KEY` | `********` | The API key clients will need to use when calling the entitlements | yes | -- |
| `LEGALTAG_API` | ex `https://foo-legal.azurewebsites.net` | Legal API endpoint | no | output of infrastructure deployment |
| `azure.application-insights.instrumentation-key` | `********` | API Key for App Insights | yes | output of infrastructure deployment |
| `azure.activedirectory.client-id` | `********` | AAD client application ID | yes | output of infrastructure deployment |
| `azure.activedirectory.AppIdUri` | `api://${azure.activedirectory.client-id}` | URI for AAD Application | no | -- |
| `azure.activedirectory.session-stateless` | `true` | Flag run in stateless mode (needed by AAD dependency) | no | -- |
| `cosmosdb_account` | ex `devintosdur2cosmosacct` | Cosmos account name | no | output of infrastructure deployment |
| `cosmosdb_key` | `********` | Key for CosmosDB | yes | output of infrastructure deployments |
| `cosmosdb_database` | ex `dev-osdu-r2-db` | Cosmos database for storage documents | no | output of infrastructure deployment |
| `azure.storage.account-name` | ex `foo-storage-account` | Storage account for storing documents | no | output of infrastructure deployment |
| `azure.storage.enable-https` | `true` | Used by spring boot starter library | no | - |
| `servicebus_topic_name` | `recordstopic` | Topic for async messaging | no | output of infrastructure deployment |
| `servicebus_namespace_name` | ex `foo-sb-namespace` | Namespace for async messaging | no | output of infrastructure deployment |
| `KEYVAULT_URI` | ex `https://foo-keyvault.vault.azure.net/` | URI of KeyVault that holds application secrets | no | output of infrastructure deployment |
| `AZURE_CLIENT_ID` | `********` | Identity to run the service locally. This enables access to Azure resources. You only need this if running locally | yes | keyvault secret: `$KEYVAULT_URI/secrets/app-dev-sp-username` |
| `AZURE_TENANT_ID` | `********` | AD tenant to authenticate users from | yes | keyvault secret: `$KEYVAULT_URI/secrets/app-dev-sp-tenant-id` |
| `AZURE_CLIENT_SECRET` | `********` | Secret for `$AZURE_CLIENT_ID` | yes | keyvault secret: `$KEYVAULT_URI/secrets/app-dev-sp-password` |
| `search_service_endpoint` | `https://search.azurewebsites.net/api/search/v2/query` | API endpoint for the search query endpoint | no | output of infrastructure deployment + path to the query endpoint |
**Required to run integration tests**
| name | value | description | sensitive? | source |
| --- | --- | --- | --- | --- |
| `AZURE_AD_APP_RESOURCE_ID` | `********` | AAD client application ID | yes | output of infrastructure deployment |
| `AZURE_AD_TENANT_ID` | `********` | AD tenant to authenticate users from | yes | -- |
| `DEPLOY_ENV` | `empty` | Required but not used | no | - |
| `DOMAIN` | `contoso.com` | OSDU R2 to run tests under | no | - |
| `INTEGRATION_TESTER` | `********` | System identity to assume for API calls. Note: this user must have entitlements configured already | no | -- |
| `LEGAL_URL` | Same as `$LEGALTAG_API` above | - | no | - |
| `NO_DATA_ACCESS_TESTER` | `********` | Service principal ID of a service principal without entitlements | yes | `aad-no-data-access-tester-client-id` secret from keyvault |
| `NO_DATA_ACCESS_TESTER_SERVICEPRINCIPAL_SECRET` | `********` | Secret for `$NO_DATA_ACCESS_TESTER` | yes | `aad-no-data-access-tester-secret` secret from keyvault |
| `PUBSUB_TOKEN` | `az` | ? | no | - |
| `STORAGE_URL` | `https://localhost:8080` | Endpoint of storage service | no | - |
| `TENANT_NAME` | ex `opendes` | OSDU tenant used for testing | no | -- |
| `TESTER_SERVICEPRINCIPAL_SECRET` | `********` | Secret for `$INTEGRATION_TESTER` | yes | -- |
### Configure Maven
Check that maven is installed:
```bash
$ mvn --version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 1.8.0_212, vendor: AdoptOpenJDK, runtime: /usr/lib/jvm/jdk8u212-b04/jre
...
```
You will need to configure access to the remote maven repository that holds the OSDU dependencies. This file should live within `~/.m2/settings.xml`:
```bash
$ cat ~/.m2/settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>os-core</id>
<username>mvn-pat</username>
<!-- Treat this auth token like a password. Do not share it with anyone, including Microsoft support. -->
<!-- The generated token expires on or before 11/14/2019 -->
<password>$PERSONAL_ACCESS_TOKEN_GOES_HERE</password>
</server>
</servers>
</settings>
```
### Build and run the application
After configuring your environment as specified above, you can follow these steps to build and run the application. These steps should be invoked from the *repository root.*
```bash
# build + test + install core service code
$ (cd storage-core/ && mvn clean install)
# build + test + package azure service code
$ (cd provider/storage-azure/ && mvn clean package)
# run service
#
# Note: this assumes that the environment variables for running the service as outlined
# above are already exported in your environment.
$ java -jar $(find provider/storage-azure/target/ -name *-spring-boot.jar)
```
### Test the application
After the service has started it should be accessible via a web browser by visiting [http://localhost:8080/swagger-ui.html](http://localhost:8080/swagger-ui.html). If the request does not fail, you can then run the integration tests.
```bash
# build + install integration test core
$ (cd testing/storage-test-core/ && mvn clean install)
# build + run Azure integration tests.
#
# Note: this assumes that the environment variables for integration tests as outlined
# above are already exported in your environment.
$ (cd testing/storage-test-azure/ && mvn clean test)
```
## Debugging
Jet Brains - the authors of Intellij IDEA, have written an [excellent guide](https://www.jetbrains.com/help/idea/debugging-your-first-java-application.html) on how to debug java programs.
## Deploying service to Azure
Service deployments into Azure are standardized to make the process the same for all services. The steps to deploy into
Azure can be [found here](https://dev.azure.com/slb-des-ext-collaboration/open-data-ecosystem/_git/infrastructure-templates?path=%2Fdocs%2Fosdu%2FSERVICE_DEPLOYMENTS.md&_a=preview)
## License
Copyright © Microsoft Corporation
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](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.
$runInstall = $false;
if ($args.Count -gt 0 -And $args[0] -eq "build") {
$runInstall = $true;
}
if ($runInstall) {
mvn clean -Dmaven.test.skip=true package
}
${env:LOG_PREFIX} = "schema"
${env:AZURE_TENANT_ID} = "58975fd3-4977-44d0-bea8-37af0baac100"
${env:AZURE_CLIENT_ID} = "c4167fb6-c724-40e8-be11-2e20d1b7a92c"
${env:AZURE_CLIENT_SECRET} = "muwCHobjuKlVzQwdUgMcta4w7mfQzAiW"
${env:KEYVAULT_URI} = "https://ado-test-fqo-fqosn0o4-kv.vault.azure.net/"
${env:aad_client_id} = "dbf53e4d-f088-4379-87c3-d9b1496e77f8"
${env:appinsights_key} = "c93d19d0-a5dc-4ea4-a564-88af4319a99b"
${env:cosmosdb_account} = "https://ado-test-fqo-fqosn0o4-cosmosdb.documents.azure.com:443/"
${env:cosmosdb_database} = "dev-osdu-r2-db"
${env:cosmosdb_key} = "ZpyNBarqeXfgaev6v2m2INmWhz9ODeJSIaCYvthDeYeIxti9ZabN29yjOHvGfEXEHGsx8cQ3s2gEYypUdlfMbA=="
${env:entitlements_app_key} = "00df85f1b08563059ea1f3fa080dd9001403"
${env:entitlements_service_api_key} = "00df85f1b08563059ea1f3fa080dd9001403"
${env:entitlements_service_endpoint} = "https://ado-test-fqo-fqosn0o4-au-entitlements.azurewebsites.net/entitlements/v1/"
${env:servicebus_namespace_name} = "ado-test-fqo-fqosn0o4sb"
${env:servicebus_connection_string} = "Endpoint=sb://ado-test-fqo-fqosn0o4sb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=zxchDE2vC9iDZD6NmIU028UWcNI2QTYjCvorMAYftzg="
${env:servicebus_topic_name} = "recordstopic"
${env:storage_account} = "adotestfqofqosn0o4sa"
${env:storage_account_key} = "LrDTXsETkvkxV3v0kR3T83hoTpoF2eBF309uvmWyrwDU2oPE/IqhM2NWD6EygXZ6RQq9pWQj0YTiVX3Pkw2Ghg=="
${env:storage_service_endpoint} = "https://ado-test-fqo-fqosn0o4-au-storage.azurewebsites.net/api/storage/v2/"
${env:server_port} = "8082"
${AZURE_AD_TENANT_ID} = "58975fd3-4977-44d0-bea8-37af0baac100"
${INTEGRATION_TESTER} = "c4167fb6-c724-40e8-be11-2e20d1b7a92c"
${AZURE_AD_APP_RESOURCE_ID} = "dbf53e4d-f088-4379-87c3-d9b1496e77f8"
${TESTER_SERVICEPRINCIPAL_SECRET} = "muwCHobjuKlVzQwdUgMcta4w7mfQzAiW"
$jarLocation = "target\os-schema-azure-0.0.1-spring-boot.jar"
java -jar $jarLocation
\ No newline at end of file
import os
import msal
def get_id_token():
tenant_id = "58975fd3-4977-44d0-bea8-37af0baac100"
resource_id = "dbf53e4d-f088-4379-87c3-d9b1496e77f8"
client_id = "c4167fb6-c724-40e8-be11-2e20d1b7a92c"
client_secret = "muwCHobjuKlVzQwdUgMcta4w7mfQzAiW"
authority_host_uri = 'https://login.microsoftonline.com'
authority_uri = authority_host_uri + "/" + tenant_id
scopes = [resource_id + '/.default']
try:
app = msal.ConfidentialClientApplication(client_id=client_id, authority=authority_uri, client_credential=client_secret)
result = app.acquire_token_for_client(scopes=scopes)
return result.get('access_token')
except Exception as e:
print(e)
def get_invalid_token():
'''
This is dummy jwt
{
"sub": "dummy@dummy.com",
"iss": "dummy@dummy.com",
"aud": "dummy.dummy.com",
"iat": 1556137273,
"exp": 1556223673,
"provider": "dummy.com",
"client": "dummy.com",
"userid": "dummytester.com",
"email": "dummytester.com",
"authz": "",
"lastname": "dummy",
"firstname": "dummy",
"country": "",
"company": "",
"jobtitle": "",
"subid": "dummyid",
"idp": "dummy",
"hd": "dummy.com",
"desid": "dummyid",
"contact_email": "dummy@dummy.com"
}
'''
return "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkdW1teUBkdW1teS5jb20iLCJpc3MiOiJkdW1teUBkdW1teS5jb20iLCJhdWQiOiJkdW1teS5kdW1teS5jb20iLCJpYXQiOjE1NTYxMzcyNzMsImV4cCI6MTU1NjIzMDk3OSwicHJvdmlkZXIiOiJkdW1teS5jb20iLCJjbGllbnQiOiJkdW1teS5jb20iLCJ1c2VyaWQiOiJkdW1teXRlc3Rlci5jb20iLCJlbWFpbCI6ImR1bW15dGVzdGVyLmNvbSIsImF1dGh6IjoiIiwibGFzdG5hbWUiOiJkdW1teSIsImZpcnN0bmFtZSI6ImR1bW15IiwiY291bnRyeSI6IiIsImNvbXBhbnkiOiIiLCJqb2J0aXRsZSI6IiIsInN1YmlkIjoiZHVtbXlpZCIsImlkcCI6ImR1bW15IiwiaGQiOiJkdW1teS5jb20iLCJkZXNpZCI6ImR1bW15aWQiLCJjb250YWN0X2VtYWlsIjoiZHVtbXlAZHVtbXkuY29tIiwianRpIjoiNGEyMWYyYzItZjU5Yy00NWZhLTk0MTAtNDNkNDdhMTg4ODgwIn0.nkiyKtfXXxAlC60iDjXuB2EAGDfZiVglP-CyU1T4etc"
print(get_id_token())
AZURE_TENANT_ID: "58975fd3-4977-44d0-bea8-37af0baac100"
AZURE_CLIENT_ID: "e6ac6dfe-8198-4f9c-b2e8-b974c0f9ef5b"
AZURE_CLIENT_SECRET: "Nyra8jJkf5cxHIpmQume1JvbRawN8HyS"
KEYVAULT_URI: "https://ado-dev-3353-335343xe-kv.vault.azure.net/"
aad_client_id: "c30cd58d-77fb-4e44-ab54-5df23ca98dbf"
appinsights_key: "02ac45fd-cbdc-4565-944f-5c0363f27c49"
cosmosdb_account: "https://ado-dev-3353-335343xe-cosmosdb.documents.azure.com:443/"
cosmosdb_database: "dev-osdu-r2-db"
cosmosdb_key: "bbaBwpz2YUgXsFnU1oHmXaxGh3O5Y32Bio0E5VEbKwvCHLOBkB4iK3ZgkSm9UljvtEZm8UolzdIfKaSRKr2SkQ=="
entitlements_app_key: "7ff1139e88d1b171ff02217affe183c8cda9"
entitlements_service_api_key: "7ff1139e88d1b171ff02217affe183c8cda9"
entitlements_service_endpoint: "https://ado-dev-3353-335343xe-au-entitlements.azurewebsites.net/"
legal_service_endpoint: "https://ado-dev-3353-335343xe-au-legal.azurewebsites.net/"
legal_service_region: "southcentralus"
search_service_endpoint: "https://ado-dev-3353-335343xe-au-search.azurewebsites.net/api/search/v2/query"
servicebus_namespace_name: "ado-dev-3353-335343xesb"
servicebus_connection_string: "Endpoint=sb://ado-dev-3353-335343xesb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=3Bh/9xI9g5IcaYMps3NptWDIoMRHAy4WMGpidV8SGo4="
servicebus_topic_name: "recordstopic"
storage_account: "adodev3353335343xesa"
storage_account_key: "cl958urs5S1yj9dauuyTnD1WAHYL7tlYUNX8unF0RGSYi6vPj/utEQgZyr07VeTnXo1wuv9ivKmD3vKSIM903Q=="
storage_service_endpoint: "https://ado-dev-3353-335343xe-au-storage.azurewebsites.net/"
server_port: "8082"
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>os-schema</artifactId>
<groupId>org.opengroup.osdu</groupId>
<version>0.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>os-schema-azure</artifactId>
<description>Azure related implementation staff.</description>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-active-directory-spring-boot-starter</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-azure</artifactId>
<version>0.0.10</version>
</dependency>
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>os-schema-core</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java8</artifactId>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-guice</artifactId>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.2.3.RELEASE</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>spring-boot</classifier>
<mainClass>org.opengroup.osdu.schema.azure.SchemaApplication</mainClass>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-webapp-maven-plugin</artifactId>
<version>1.7.0</version>
<configuration>
<schemaVersion>V2</schemaVersion>
<authentication>
<serverId>azure-auth</serverId>
</authentication>
<subscriptionId>${azure.appservice.subscription}</subscriptionId>
<resourceGroup>${azure.appservice.resourcegroup}</resourceGroup>
<appServicePlanName>${azure.appservice.plan}</appServicePlanName>
<appName>${azure.appservice.appname}</appName>
<appSettings>
<property>
<name>JAVA_OPTS</name>
<value>-Dserver.port=80</value>
</property>
</appSettings>
<deployment>
<resources>
<resource>
<directory>${project.basedir}/target</directory>
<includes>
<include>*spring-boot.jar</include>
</includes>
</resource>
</resources>
</deployment>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
This diff is collapsed.
// Copyright © Microsoft Corporation
//
// 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.
package org.opengroup.osdu.schema.azure;
import org.opengroup.osdu.azure.dependencies.AzureOSDUConfig;
import org.opengroup.osdu.schema.azure.di.AzureBootstrapConfig;
import org.opengroup.osdu.schema.azure.di.CosmosContainerConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class })
@ComponentScan({ "org.opengroup" })
public class SchemaApplication {
public static void main(String[] args)
{
Class<?>[] sources = new Class<?>[]{
SchemaApplication.class,
AzureBootstrapConfig.class,
AzureOSDUConfig.class,
CosmosContainerConfig.class
};
SpringApplication.run(sources, args);
SpringApplication.run(SchemaApplication.class, args);
}
}
// Copyright © Microsoft Corporation
//
// 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.
package org.opengroup.osdu.schema.azure.definitions;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.opengroup.osdu.schema.model.Authority;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AuthorityDoc {
private String id;
private String dataPartitionId;
private Authority authority;
}
// Copyright © Microsoft Corporation
//
// 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