diff --git a/NOTICE b/NOTICE index 95e0dcfe686064ed81e1a99e20afe0e09a047809..e4fcdfd7022ad80bf01b8911005194db29c60860 100644 --- a/NOTICE +++ b/NOTICE @@ -29,266 +29,12 @@ The following software have components provided under the terms of this license: - AMQP 1.0 JMS Spring Boot Starter (from https://repo1.maven.org/maven2/org/amqphub/spring/amqp-10-jms-spring-boot-starter) - ASM based accessors helper used by json-smart (from ) - ASM based accessors helper used by json-smart (from ) -- AWS Java SDK for AWS Amplify (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS App Mesh (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS AppSync (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Application Auto Scaling (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Application Discovery Service (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Audit Manager (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Auto Scaling Plans (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Backup (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Batch (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Budgets (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Certificate Manager (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Certificate Manager Private Certificate Authority (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Cloud9 (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS CloudFormation (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS CloudHSM V2 (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS CloudTrail (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Code Build (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS CodeCommit (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS CodeDeploy (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS CodePipeline (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS CodeStar (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS CodeStar Notifications (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS CodeStar connections (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Comprehend Medical (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Compute Optimizer (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Config (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Cost Explorer (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Cost and Usage Report (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Data Exchange (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Data Pipeline (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS DataSync (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Database Migration Service (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Device Farm (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Direct Connect (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Directory Service (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS EC2 Instance Connect (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Elastic Beanstalk (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Elemental MediaConvert (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Elemental MediaLive (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Elemental MediaPackage (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Elemental MediaPackage VOD (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Elemental MediaStore (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Elemental MediaStore Data Plane (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Fault Injection Simulator (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS GameLift (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Global Accelerator (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Glue (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Glue DataBrew (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Greengrass (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Ground Station (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Health APIs and Notifications (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IAM (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Import/Export (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT 1-Click Devices (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT 1-Click Projects (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT Analytics (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT Core Device Advisor (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT Events (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT Events Data (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT Fleet Hub (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT Greengrass V2 (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT Jobs Data Plane (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT Secure Tunneling (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT SiteWise (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT Things Graph (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS IoT Wireless (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS KMS (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Lake Formation (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Lambda (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Lex (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS License Manager (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Marketplace Catalog (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Marketplace Commerce Analytics (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Marketplace Entitlement (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Marketplace Metering Service (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS MediaConnect (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS MediaTailor (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Migration Hub (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Migration Hub Config (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Mobile (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Network Firewall (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Network Manager (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS OpsWorks (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS OpsWorks for Chef Automate (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Organizations (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Outposts (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Performance Insights (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Pricing (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS RDS Data (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Resource Access Manager (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Resource Groups (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Resource Groups Tagging API (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS RoboMaker (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS S3 Control (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS SSO Identity Store (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS SSO OIDC (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS STS (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Savings Plans (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Secrets Manager (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS SecurityHub (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Server Migration (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Service Catalog (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Service Catalog App Registry (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Shield (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Signer (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Single Sign-On (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Single Sign-On Admin (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Step Functions (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Storage Gateway (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Support (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Systems Manager Incident Manager (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Systems Manager Incident Manager Contacts (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Transfer for SFTP (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS WAF (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS WAFV2 (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS Well-Architected Tool (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS X-Ray (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWSKendraFrontend (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWSServerlessApplicationRepository (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Access Analyzer (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Alexa For Business (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon API Gateway (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon AppConfig (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon AppIntegrations (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon AppStream (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Appflow (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Athena (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Augmented AI Runtime (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Chime (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon CloudDirectory (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon CloudFront (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon CloudSearch (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon CloudWatch (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon CloudWatch Application Insights (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon CloudWatch Events (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon CloudWatch Logs (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon CodeGuru Profiler (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon CodeGuru Reviewer (from https://aws.amazon.com/sdkforjava) - AWS Java SDK for Amazon Cognito Identity (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Cognito Identity Provider Service (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Cognito Sync (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Comprehend (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Connect (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Connect Contact Lens (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Connect Customer Profiles (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Connect Participant (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Data Lifecycle Manager (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Detective (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon DevOps Guru (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon DocumentDB with MongoDB compatibility (from https://aws.amazon.com/sdkforjava) - AWS Java SDK for Amazon DynamoDB (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon DynamoDB Accelerator (DAX) (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon EC2 (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon EMR (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon EMR Containers (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon ElastiCache (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Elastic Inference (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Elastic Block Store (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Elastic Container Registry Public (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Elastic Container Service for Kubernetes (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Elastic File System (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Elastic Transcoder (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Elasticsearch Service (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon EventBridge (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon FSx (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Forecast (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Forecast Query (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Fraud Detector (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Glacier (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon GuardDuty (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon HealthLake (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Honeycode (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Interactive Video (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Kinesis (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Kinesis Analytics (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Kinesis Video Signaling Channels (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Kinesis Video Streams (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Lex Model Building (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Lex Model Building V2 (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Lex Runtime V2 (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Lightsail (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Location (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Lookout for Equipment (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Lookout for Metrics (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Lookout for Vision (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Machine Learning (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Macie (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Macie 2 (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Managed Blockchain (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Mechanical Turk Requester (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Neptune (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Personalize (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Personalize Events (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Personalize Runtime (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Pinpoint (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Pinpoint Email (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Pinpoint SMS and Voice (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Polly (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Prometheus (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon QLDB (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon QLDB Session (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon QuickSight (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon RDS (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Redshift (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Rekognition (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Route 53 Auto Naming (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Route 53 Resolver (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Route53 (from https://aws.amazon.com/sdkforjava) - AWS Java SDK for Amazon S3 (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon S3 on Outposts (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon SES (from https://aws.amazon.com/sdkforjava) - AWS Java SDK for Amazon SNS (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon SQS (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon SWF (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon SageMaker (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon SageMaker Feature Store Runtime (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon SageMaker Runtime (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Sagemaker Edge Manager (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Simple Email (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon SimpleDB (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Snowball (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Textract (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Timestream Query (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Timestream Write (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Transcribe (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon Translate (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon WorkLink (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon WorkMail (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon WorkMail Message Flow (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Amazon WorkSpaces (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AmazonApiGatewayManagementApi (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AmazonApiGatewayV2 (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AmazonMQ (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AmazonMWAA (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AmazonNimbleStudio (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AmplifyBackend (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Application Migration (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Auto Scaling (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Braket (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for CodeArtifact (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for EC2 Image Builder (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Elastic Load Balancing (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Elastic Load Balancing (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for FinSpace Public API (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for FinSpace User Environment Management (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Firewall Management (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Managed Streaming for Kafka (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Redshift Data API (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Schemas (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Service Quotas (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for Synthetics (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for the AWS CloudHSM (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for the AWS Simple Systems Management (SSM) Service (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for the Amazon EC2 Container Registry (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for the Amazon EC2 Container Service (from https://aws.amazon.com/sdkforjava) -- AWS SDK for Java - Core (from https://aws.amazon.com/sdkforjava) -- AWS SDK for Java - Models (from https://aws.amazon.com/sdkforjava) - Adapter: RxJava (from https://repo1.maven.org/maven2/com/squareup/retrofit2/adapter-rxjava) -- Apache Ant + JUnit (from http://ant.apache.org/) +- Apache Ant + JUnit (from https://ant.apache.org/) - Apache Ant Core (from https://ant.apache.org/) - Apache Ant Launcher (from https://ant.apache.org/) - Apache Commons CLI (from http://commons.apache.org/proper/commons-cli/) @@ -321,7 +67,6 @@ The following software have components provided under the terms of this license: - Byte Buddy agent (from https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent) - ClassMate (from http://github.com/cowtowncoder/java-classmate) - Cloud Storage JSON API v1-rev20210127-1.31.5 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-storage) -- CloudWatch Metrics for AWS Java SDK (from https://aws.amazon.com/sdkforjava) - Cobertura (from http://cobertura.sourceforge.net) - Collections (from https://repo1.maven.org/maven2/commons-collections/commons-collections) - Commons Digester (from http://commons.apache.org/digester/) @@ -336,14 +81,14 @@ The following software have components provided under the terms of this license: - Doxia :: XDoc Module (from http://maven.apache.org/doxia/doxia/doxia-modules/doxia-module-xdoc/) - Doxia :: XHTML Module (from http://maven.apache.org/doxia/doxia/doxia-modules/doxia-module-xhtml/) - Doxia Sitetools :: Decoration Model (from http://maven.apache.org/doxia/doxia-sitetools/doxia-decoration-model/) -- Doxia Sitetools :: Site Renderer Component (from http://maven.apache.org/doxia/doxia-sitetools/doxia-site-renderer/) +- Doxia Sitetools :: Site Renderer (from https://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-site-renderer) - FindBugs-jsr305 (from http://findbugs.sourceforge.net/) - Google APIs Client Library for Java (from https://repo1.maven.org/maven2/com/google/api-client/google-api-client) - Google App Engine extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-appengine) -- Google Cloud Core (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core) +- Google Cloud Core (from https://github.com/googleapis/java-core) - Google Cloud Core HTTP (from https://github.com/googleapis/java-core) - Google Cloud Core gRPC (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-grpc) -- Google Cloud Datastore (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-datastore) +- Google Cloud Datastore (from https://github.com/googleapis/java-datastore) - Google Cloud Key Management Service (KMS) API v1-rev9-1.22.0 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-cloudkms) - Google Cloud Logging (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-logging) - Google Cloud Pub/Sub (from https://github.com/googleapis/java-pubsub) @@ -357,7 +102,7 @@ The following software have components provided under the terms of this license: - Hibernate Validator Engine (from https://repo1.maven.org/maven2/org/hibernate/validator/hibernate-validator) - HttpClient (from http://hc.apache.org/httpcomponents-client) - HttpClient Cache (from http://hc.apache.org/httpcomponents-client) -- HttpCore (from http://hc.apache.org/httpcomponents-core-ga/) +- HttpCore (from http://hc.apache.org/httpcomponents-core-ga) - IBM COS Java SDK for Amazon S3 (from https://github.com/ibm/ibm-cos-sdk-java) - IBM COS Java SDK for COS KMS (from https://github.com/ibm/ibm-cos-sdk-java) - IBM COS SDK For Java (from https://github.com/ibm/ibm-cos-sdk-java) @@ -367,7 +112,6 @@ The following software have components provided under the terms of this license: - JBoss Logging 3 (from http://www.jboss.org) - JCIP Annotations under Apache License (from http://stephenc.github.com/jcip-annotations) - JDOM (from http://www.jdom.org) -- JMES Path Query library (from https://aws.amazon.com/sdkforjava) - JSON Small and Fast Parser (from https://repo1.maven.org/maven2/net/minidev/json-smart) - JSON Small and Fast Parser (from https://repo1.maven.org/maven2/net/minidev/json-smart) - JSON Web Token support for the JVM (from https://repo1.maven.org/maven2/io/jsonwebtoken/jjwt) @@ -377,21 +121,20 @@ The following software have components provided under the terms of this license: - Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-jackson2) - Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary) - Jackson datatype: JSR310 (from https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310) -- Jackson datatype: Joda (from https://github.com/FasterXML/jackson-datatype-joda) - Jackson datatype: jdk8 (from https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8) - Jackson extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-jackson) - Jackson module: Afterburner (from https://github.com/FasterXML/jackson-modules-base) -- Jackson module: Old JAXB Annotations (javax.xml.bind) (from https://github.com/FasterXML/jackson-modules-base) - Jackson-annotations (from http://github.com/FasterXML/jackson) - Jackson-annotations (from http://github.com/FasterXML/jackson) - Jackson-core (from https://github.com/FasterXML/jackson-core) - Jackson-core (from https://github.com/FasterXML/jackson-core) -- Jackson-dataformat-XML (from https://github.com/FasterXML/jackson-dataformat-xml) +- Jackson-dataformat-XML (from http://wiki.fasterxml.com/JacksonExtensionXmlDataBinding) - Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson-dataformats-text) +- Jackson-datatype-JODA (from http://wiki.fasterxml.com/JacksonModuleJoda) +- Jackson-module-JAXB-annotations (from http://wiki.fasterxml.com/JacksonJAXBAnnotations) - Jackson-module-parameter-names (from https://repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-module-parameter-names) - Jakarta Bean Validation API (from https://beanvalidation.org) - Jakarta Expression Language Implementation (from https://projects.eclipse.org/projects/ee4j.el) -- Java Libraries for Amazon Simple WorkFlow (from https://aws.amazon.com/sdkforjava) - Java Native Access (from https://github.com/java-native-access/jna) - Java Native Access Platform (from https://github.com/java-native-access/jna) - Java UUID Generator (from http://wiki.fasterxml.com/JugHome) @@ -399,9 +142,8 @@ The following software have components provided under the terms of this license: - Javassist (from http://www.javassist.org/) - JetBrains Java Annotations (from https://github.com/JetBrains/java-annotations) - JetBrains Java Annotations (from https://github.com/JetBrains/java-annotations) -- Jetty Server (from https://repo1.maven.org/maven2/org/mortbay/jetty/jetty) -- Jetty Utilities (from https://repo1.maven.org/maven2/org/mortbay/jetty/jetty-util) -- Joda-Time (from https://www.joda.org/joda-time/) +- Jetty Server (from http://jetty.mortbay.org) +- Jetty Utilities (from http://jetty.mortbay.org) - Joda-Time (from https://www.joda.org/joda-time/) - Joda-Time (from https://www.joda.org/joda-time/) - KeePassJava2 :: All (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2) @@ -410,15 +152,6 @@ The following software have components provided under the terms of this license: - KeePassJava2 :: KDB (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-kdb) - KeePassJava2 :: KDBX (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-kdbx) - KeePassJava2 :: Simple (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-simple) -- KeyCloak Authz: Client API (from https://repo1.maven.org/maven2/org/keycloak/keycloak-authz-client) -- Keycloak :: Spring :: Boot :: Default :: Starter (from ) -- Keycloak Adapter Core (from https://repo1.maven.org/maven2/org/keycloak/keycloak-adapter-core) -- Keycloak Adapter SPI (from https://repo1.maven.org/maven2/org/keycloak/keycloak-adapter-spi) -- Keycloak Common (from https://repo1.maven.org/maven2/org/keycloak/keycloak-common) -- Keycloak Core (from https://repo1.maven.org/maven2/org/keycloak/keycloak-core) -- Keycloak Spring Boot 2 Integration (from ) -- Keycloak Spring Boot Adapter Core (from ) -- Keycloak Spring Security Integration (from https://repo1.maven.org/maven2/org/keycloak/keycloak-spring-security-adapter) - Kotlin Stdlib (from https://kotlinlang.org/) - Kotlin Stdlib Common (from https://kotlinlang.org/) - Logback Contrib :: JSON :: Classic (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-json-classic) @@ -478,7 +211,7 @@ The following software have components provided under the terms of this license: - Non-Blocking Reactive Foundation for the JVM (from https://github.com/reactor/reactor-core) - OAuth 2.0 SDK with OpenID Connect extensions (from https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions) - Objenesis (from http://objenesis.org) -- Okio (from https://github.com/square/okio/) +- OkHttp Logging Interceptor (from https://repo1.maven.org/maven2/com/squareup/okhttp3/logging-interceptor) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) @@ -487,25 +220,25 @@ The following software have components provided under the terms of this license: - Plexus Velocity Component (from ) - PowerMock (from http://www.powermock.org) - PowerMock (from http://www.powermock.org) -- PowerMock (from http://www.powermock.org) -- PowerMock (from http://www.powermock.org) -- PowerMock (from http://www.powermock.org) -- PowerMock (from http://www.powermock.org) -- PowerMock (from http://www.powermock.org) -- PowerMock (from http://www.powermock.org) -- PowerMock (from http://www.powermock.org) -- PowerMock (from http://www.powermock.org) - Protocol Buffer extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-protobuf) - Proton-J (from https://repo1.maven.org/maven2/org/apache/qpid/proton-j) - QpidJMS Client (from ) -- Reactive Streams Netty driver (from https://github.com/reactor/reactor-netty) -- Retrofit (from https://github.com/square/retrofit) +- Reactor Netty with all modules (from https://github.com/reactor/reactor-netty) +- Retrofit (from https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit) - Servlet Specification 2.5 API (from http://jetty.mortbay.org) - SnakeYAML (from http://www.snakeyaml.org) - Spring AOP (from https://github.com/spring-projects/spring-framework) - Spring Beans (from https://github.com/spring-projects/spring-framework) -- Spring Boot Log4j 2 Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Tomcat Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-tomcat) +- Spring Boot Actuator (from http://projects.spring.io/spring-boot/) +- Spring Boot Actuator Starter (from http://projects.spring.io/spring-boot/) +- Spring Boot Log4j 2 Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-log4j2) +- Spring Boot Security Starter (from http://projects.spring.io/spring-boot/) +- Spring Boot Security Starter (from http://projects.spring.io/spring-boot/) +- Spring Boot Starter (from http://projects.spring.io/spring-boot/) +- Spring Boot Test Starter (from http://projects.spring.io/spring-boot/) +- Spring Boot Test Starter (from http://projects.spring.io/spring-boot/) +- Spring Boot Tomcat Starter (from http://projects.spring.io/spring-boot/) +- Spring Boot Web Starter (from http://projects.spring.io/spring-boot/) - Spring Cloud GCP Autoconfigure Module (from https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-gcp-autoconfigure) - Spring Cloud GCP Core Module (from https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-gcp-core) - Spring Cloud GCP Datastore Module (from https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-gcp-data-datastore) @@ -521,6 +254,7 @@ The following software have components provided under the terms of this license: - Spring Messaging (from https://github.com/spring-projects/spring-framework) - Spring Plugin - Metadata Extension (from https://repo1.maven.org/maven2/org/springframework/plugin/spring-plugin-metadata) - Spring Plugin Core (from https://repo1.maven.org/maven2/org/springframework/plugin/spring-plugin-core) +- Spring Security - Core (from https://repo1.maven.org/maven2/org/springframework/security/spring-security-core) - Spring TestContext Framework (from https://github.com/spring-projects/spring-framework) - Spring Transaction (from https://github.com/spring-projects/spring-framework) - Spring Web (from https://github.com/spring-projects/spring-framework) @@ -535,7 +269,6 @@ The following software have components provided under the terms of this license: - asm (from http://asm.ow2.io/) - asm (from http://asm.ow2.io/) - asm (from http://asm.ow2.io/) -- com.google.api.grpc:proto-google-cloud-datastore-v1 (from https://github.com/googleapis/googleapis) - datastore-v1-proto-client (from https://repo1.maven.org/maven2/com/google/cloud/datastore/datastore-v1-proto-client) - error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations) - grpc-google-cloud-pubsub-v1 (from https://repo1.maven.org/maven2/com/google/api/grpc/grpc-google-cloud-pubsub-v1) @@ -550,59 +283,60 @@ The following software have components provided under the terms of this license: - io.grpc:grpc-protobuf-lite (from https://github.com/grpc/grpc-java) - io.grpc:grpc-stub (from https://github.com/grpc/grpc-java) - ion-java (from https://github.com/amznlabs/ion-java/) -- ion-java (from https://github.com/amznlabs/ion-java/) - jackson-databind (from http://github.com/FasterXML/jackson) - jackson-databind (from http://github.com/FasterXML/jackson) - java-cloudant (from https://cloudant.com) - java-cloudant (from https://cloudant.com) - javatuples (from http://www.javatuples.org) - javax.inject (from http://code.google.com/p/atinject/) -- jose4j (from https://bitbucket.org/b_c/jose4j/) - lettuce (from http://github.com/mp911de/lettuce/wiki) -- logging-interceptor (from https://github.com/square/okhttp) - micrometer-core (from https://github.com/micrometer-metrics/micrometer) - micrometer-registry-azure-monitor (from https://github.com/micrometer-metrics/micrometer) - mockito-core (from https://github.com/mockito/mockito) - mockito-core (from https://github.com/mockito/mockito) - okhttp (from https://square.github.io/okhttp/) - okhttp-urlconnection (from https://github.com/square/okhttp) +- okio (from https://github.com/square/okio/) - org.apiguardian:apiguardian-api (from https://github.com/apiguardian-team/apiguardian) - org.opentest4j:opentest4j (from https://github.com/ota4j-team/opentest4j) - org.xmlunit:xmlunit-core (from http://www.xmlunit.org/) +- powermock-api-support (from https://repo1.maven.org/maven2/org/powermock/powermock-api-support) +- powermock-api-support (from https://repo1.maven.org/maven2/org/powermock/powermock-api-support) +- powermock-core (from http://www.powermock.org) +- powermock-core (from http://www.powermock.org) +- powermock-module-junit4 (from http://www.powermock.org) +- powermock-module-junit4 (from http://www.powermock.org) - powermock-module-junit4-common (from https://repo1.maven.org/maven2/org/powermock/powermock-module-junit4-common) - powermock-module-junit4-common (from https://repo1.maven.org/maven2/org/powermock/powermock-module-junit4-common) +- powermock-reflect (from https://repo1.maven.org/maven2/org/powermock/powermock-reflect) +- powermock-reflect (from https://repo1.maven.org/maven2/org/powermock/powermock-reflect) - project ':json-path' (from https://github.com/jayway/JsonPath) +- proto-google-cloud-datastore-v1 (from https://github.com/googleapis/java-datastore/proto-google-cloud-datastore-v1) - proto-google-cloud-logging-v2 (from https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-logging-v2) - proto-google-cloud-pubsub-v1 (from https://github.com/googleapis/java-pubsub/proto-google-cloud-pubsub-v1) -- proto-google-common-protos (from https://github.com/googleapis/api-client-staging) +- proto-google-common-protos (from https://github.com/googleapis/java-iam/proto-google-common-protos) - proto-google-iam-v1 (from https://github.com/googleapis/java-iam/proto-google-iam-v1) - rxjava (from https://github.com/ReactiveX/RxJava) - spring-boot (from https://spring.io/projects/spring-boot) -- spring-boot-actuator (from https://spring.io/projects/spring-boot) - spring-boot-actuator-autoconfigure (from https://spring.io/projects/spring-boot) - spring-boot-autoconfigure (from https://spring.io/projects/spring-boot) -- spring-boot-container-bundle (from ) -- spring-boot-dependencies (from https://spring.io/projects/spring-boot) -- spring-boot-starter (from https://spring.io/projects/spring-boot) -- spring-boot-starter-actuator (from https://spring.io/projects/spring-boot) - spring-boot-starter-json (from https://spring.io/projects/spring-boot) - spring-boot-starter-logging (from https://spring.io/projects/spring-boot) - spring-boot-starter-reactor-netty (from https://spring.io/projects/spring-boot) -- spring-boot-starter-security (from https://spring.io/projects/spring-boot) -- spring-boot-starter-test (from https://spring.io/projects/spring-boot) - spring-boot-starter-validation (from https://spring.io/projects/spring-boot) -- spring-boot-starter-web (from https://spring.io/projects/spring-boot) - spring-boot-starter-webflux (from https://spring.io/projects/spring-boot) - spring-boot-test (from https://spring.io/projects/spring-boot) - spring-boot-test-autoconfigure (from https://spring.io/projects/spring-boot) -- spring-security-config (from https://spring.io/projects/spring-security) -- spring-security-core (from https://spring.io/projects/spring-security) -- spring-security-oauth2-client (from https://spring.io/projects/spring-security) -- spring-security-oauth2-core (from https://spring.io/projects/spring-security) -- spring-security-oauth2-jose (from https://spring.io/projects/spring-security) -- spring-security-oauth2-resource-server (from https://spring.io/projects/spring-security) -- spring-security-test (from http://spring.io/spring-security) -- spring-security-web (from https://spring.io/projects/spring-security) +- spring-security-config (from https://spring.io/spring-security) +- spring-security-oauth2-client (from https://spring.io/spring-security) +- spring-security-oauth2-client (from https://spring.io/spring-security) +- spring-security-oauth2-core (from https://spring.io/spring-security) +- spring-security-oauth2-jose (from https://spring.io/spring-security) +- spring-security-oauth2-jose (from https://spring.io/spring-security) +- spring-security-oauth2-resource-server (from https://spring.io/spring-security) +- spring-security-test (from https://spring.io/spring-security) +- spring-security-test (from https://spring.io/spring-security) +- spring-security-web (from https://spring.io/spring-security) - springfox-core (from https://github.com/springfox/springfox) - springfox-schema (from https://github.com/springfox/springfox) - springfox-spi (from https://github.com/springfox/springfox) @@ -614,7 +348,7 @@ The following software have components provided under the terms of this license: - swagger-jaxrs (from ) - swagger-models (from https://repo1.maven.org/maven2/io/swagger/swagger-models) - tomcat-embed-core (from http://tomcat.apache.org/) -- tomcat-embed-websocket (from https://tomcat.apache.org/) +- tomcat-embed-websocket (from http://tomcat.apache.org/) - xml-apis (from ) ======================================================================== @@ -631,7 +365,7 @@ The following software have components provided under the terms of this license: - Hamcrest Core (from http://hamcrest.org/) - HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) - Plexus Common Utilities (from https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils) -- Reflections (from http://github.com/ronmamo/reflections) +- Reflections (from http://code.google.com/p/reflections/) - Stax2 API (from http://github.com/FasterXML/stax2-api) - ThreeTen backport (from https://www.threeten.org/threetenbp) - jaxen (from http://www.cafeconleche.org/jaxen) @@ -642,10 +376,6 @@ BSD-3-Clause The following software have components provided under the terms of this license: - API Common (from https://github.com/googleapis/api-common-java) -- ASM Analysis (from ) -- ASM Commons (from https://repo1.maven.org/maven2/org/ow2/asm/asm-commons) -- ASM Tree (from ) -- ASM Util (from ) - Apache Commons Codec (from https://commons.apache.org/proper/commons-codec/) - GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) - GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) @@ -656,7 +386,6 @@ The following software have components provided under the terms of this license: - Hamcrest (from http://hamcrest.org/JavaHamcrest/) - Hamcrest Core (from http://hamcrest.org/) - HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) -- Jakarta Activation (from https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation) - Jakarta Activation API jar (from https://repo1.maven.org/maven2/jakarta/activation/jakarta.activation-api) - Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) @@ -667,13 +396,17 @@ The following software have components provided under the terms of this license: - Plexus Common Utilities (from https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils) - Protocol Buffers [Core] (from https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java) - Protocol Buffers [Util] (from https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util) -- Reflections (from http://github.com/ronmamo/reflections) +- Reflections (from http://code.google.com/p/reflections/) - SnakeYAML (from http://www.snakeyaml.org) - Spring Core (from https://github.com/spring-projects/spring-framework) - ThreeTen backport (from https://www.threeten.org/threetenbp) - asm (from http://asm.ow2.io/) - asm (from http://asm.ow2.io/) - asm (from http://asm.ow2.io/) +- asm-analysis (from http://asm.ow2.io/) +- asm-commons (from http://asm.ow2.io/) +- asm-tree (from http://asm.ow2.io/) +- asm-util (from http://asm.ow2.io/) - classworlds (from http://classworlds.codehaus.org/) - jaxen (from http://www.cafeconleche.org/jaxen) - jsch (from https://repo1.maven.org/maven2/com/jcraft/jsch) @@ -880,15 +613,11 @@ MIT ======================================================================== The following software have components provided under the terms of this license: -- AWS Java SDK for AWS Lambda (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK for AWS License Manager (from https://aws.amazon.com/sdkforjava) -- AWS SDK for Java - Models (from https://aws.amazon.com/sdkforjava) - Animal Sniffer Annotations (from https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations) - Azure Java Client Authentication Library for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) - Azure Java Client Runtime for ARM (from https://github.com/Azure/autorest-clientruntime-for-java) - Azure Java Client Runtime for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) - Azure Spring Boot AutoConfigure (from https://github.com/Azure/azure-sdk-for-java) -- Bouncy Castle Provider (from http://www.bouncycastle.org/java.html) - Checker Qual (from https://checkerframework.org) - Default Plexus Container (from https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default) - Extensions on Apache Proton-J library (from https://github.com/Azure/qpid-proton-j-extensions) @@ -914,13 +643,14 @@ The following software have components provided under the terms of this license: - Microsoft Azure internal Avro module for Storage (from https://github.com/Azure/azure-sdk-for-java) - Netty/Codec/HTTP (from https://repo1.maven.org/maven2/io/netty/netty-codec-http) - Netty/Common (from https://repo1.maven.org/maven2/io/netty/netty-common) -- Plexus Default Interactivity Handler (from ) +- Plexus Default Interactivity Handler (from https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactivity-api) - Project Lombok (from https://projectlombok.org) - Project Lombok (from https://projectlombok.org) - Project Lombok (from https://projectlombok.org) - SLF4J API Module (from http://www.slf4j.org) - Spongy Castle (from http://rtyley.github.io/spongycastle/) - Spring Data for Azure Cosmos DB SQL API (from https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos) +- Spring Security - Core (from https://repo1.maven.org/maven2/org/springframework/security/spring-security-core) - adal4j (from https://github.com/AzureAD/azure-activedirectory-library-for-java) - azure-documentdb (from https://azure.microsoft.com/en-us/services/cosmos-db/) - documentdb-bulkexecutor (from http://azure.microsoft.com/en-us/services/documentdb/) @@ -931,7 +661,6 @@ The following software have components provided under the terms of this license: - mockito-junit-jupiter (from https://github.com/mockito/mockito) - msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java) - msal4j-persistence-extension (from https://github.com/AzureAD/microsoft-authentication-extensions-for-java) -- spring-security-core (from https://spring.io/projects/spring-security) ======================================================================== MPL-1.1 @@ -956,7 +685,6 @@ PHP-3.01 ======================================================================== The following software have components provided under the terms of this license: -- Jakarta Activation (from https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation) - Jakarta Activation API jar (from https://repo1.maven.org/maven2/jakarta/activation/jakarta.activation-api) - Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api) @@ -998,24 +726,19 @@ WTFPL ======================================================================== The following software have components provided under the terms of this license: -- Reflections (from http://github.com/ronmamo/reflections) +- Reflections (from http://code.google.com/p/reflections/) ======================================================================== public-domain ======================================================================== The following software have components provided under the terms of this license: -- AWS SDK for Java - Models (from https://aws.amazon.com/sdkforjava) - Asynchronous Http Client (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client) -- Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs (from http://www.bouncycastle.org/java.html) -- Bouncy Castle Provider (from http://www.bouncycastle.org/java.html) - Guava: Google Core Libraries for Java (from https://repo1.maven.org/maven2/com/google/guava/guava) - HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) - JTidy (from http://jtidy.sourceforge.net) - Joda-Time (from https://www.joda.org/joda-time/) - Joda-Time (from https://www.joda.org/joda-time/) -- Joda-Time (from https://www.joda.org/joda-time/) -- Keycloak Common (from https://repo1.maven.org/maven2/org/keycloak/keycloak-common) - LatencyUtils (from http://latencyutils.github.io/LatencyUtils/) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Azure SDK for EventGrid Management (from https://github.com/Azure/azure-sdk-for-java) @@ -1035,8 +758,6 @@ unknown ======================================================================== The following software have components provided under the terms of this license: -- Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs (from http://www.bouncycastle.org/java.html) -- Bouncy Castle Provider (from http://www.bouncycastle.org/java.html) - Byte Buddy (without dependencies) (from https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy) - Checker Qual (from https://checkerframework.org) - JSON in Java (from https://github.com/douglascrockford/JSON-java) @@ -1048,7 +769,6 @@ The following software have components provided under the terms of this license: - JUnit Jupiter Params (from https://junit.org/junit5/) - JUnit Platform Commons (from https://junit.org/junit5/) - JUnit Platform Engine API (from https://junit.org/junit5/) -- Jakarta Activation (from https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation) - Jakarta Activation API jar (from https://repo1.maven.org/maven2/jakarta/activation/jakarta.activation-api) - Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api) - Spongy Castle (from http://rtyley.github.io/spongycastle/) diff --git a/devops/azure/chart/helm-config.yaml b/devops/azure/chart/helm-config.yaml index 89157496f323e000d9c149870ed0b7cc70c1fa05..2be1682717f591beab15bcaab8ab7d365fa5feaf 100644 --- a/devops/azure/chart/helm-config.yaml +++ b/devops/azure/chart/helm-config.yaml @@ -14,3 +14,12 @@ image: repository: #{container-registry}#.azurecr.io branch: #{ENVIRONMENT_NAME}# tag: #{Build.SourceVersion}# + +istioDnsHost: #{ISTIO_DNS_HOST}# + +env: #{ENVIRONMENT_NAME}# + +featureFlag: + resourceLimits: + enabledEnvs: + - demo diff --git a/devops/azure/chart/templates/deployment.yaml b/devops/azure/chart/templates/deployment.yaml index da322c003bc23ed68055050252d314d7ffc7537d..9d69bc4b8487c7d7c4050e800c380bcc76556d00 100644 --- a/devops/azure/chart/templates/deployment.yaml +++ b/devops/azure/chart/templates/deployment.yaml @@ -45,6 +45,15 @@ spec: imagePullPolicy: Always ports: - containerPort: 80 + {{- if has .Values.env .Values.featureFlag.resourceLimits.enabledEnvs }} + resources: + requests: + cpu: "100m" + memory: "600Mi" + limits: + cpu: "1000m" + memory: "1Gi" + {{- end }} readinessProbe: httpGet: path: /actuator/health @@ -93,6 +102,6 @@ spec: - name: azure_activedirectory_AppIdUri value: "api://$(aad_client_id)" - name: azure_activedirectory_session_stateless - value: "true" + value: "false" - name: azure_istioauth_enabled value: "true" \ No newline at end of file diff --git a/devops/azure/chart/templates/service.yaml b/devops/azure/chart/templates/service.yaml index eb5d124b64e3fdc13f20c0c0480aa1fd13a7a173..a1587090bdf893b2b9ce504bc027bd162f6249f3 100644 --- a/devops/azure/chart/templates/service.yaml +++ b/devops/azure/chart/templates/service.yaml @@ -23,5 +23,6 @@ spec: - protocol: TCP port: 80 targetPort: 80 + name: http selector: app: {{ .Chart.Name }} diff --git a/devops/azure/chart/templates/virtual-service.yaml b/devops/azure/chart/templates/virtual-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bdde0f07dafff4c5029d311a62db1fe87c10de34 --- /dev/null +++ b/devops/azure/chart/templates/virtual-service.yaml @@ -0,0 +1,35 @@ +--- +# Source: /devops/azure/chart/templates/virtual-service.yaml +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: {{ .Chart.Name }} + namespace: osdu +spec: + hosts: + - "{{ .Values.istioDnsHost }}" + gateways: + - istio-gateway + http: + - match: + - uri: + prefix: "/api/{{ .Chart.Name }}/v1" + route: + - destination: + host: {{ .Chart.Name }} + port: + number: 80 + corsPolicy: + maxAge: "60m" + allowCredentials: true + allowHeaders: + - Authorization + - Data-Partition-Id + - Correlation-Id + allowMethods: + - POST + - GET + - PATCH + - DELETE + allowOrigins: + - prefix: "*" \ No newline at end of file diff --git a/devops/azure/chart/values.yaml b/devops/azure/chart/values.yaml index 90c2c83ff2333108dc351f642fce4bcba46fc3fb..9c987e7e65b5187ddf59a93ec4ba947223173f41 100644 --- a/devops/azure/chart/values.yaml +++ b/devops/azure/chart/values.yaml @@ -21,3 +21,12 @@ image: repository: community.opengroup.org:5555/osdu/platform/system/partition branch: master tag: latest + +istioDnsHost: "" + +env: demo + +featureFlag: + resourceLimits: + enabledEnvs: + - demo diff --git a/devops/gcp/configmap/values.yaml b/devops/gcp/configmap/values.yaml index ae3a9c094550d022d7d9e10cb4854bf2d936d837..7fe03d6368b94a291f18ab4525864a551ceaf558 100644 --- a/devops/gcp/configmap/values.yaml +++ b/devops/gcp/configmap/values.yaml @@ -4,7 +4,7 @@ data: google_audiences: "" key_ring: "" kms_key: "" - log_level: "" + log_level: "INFO" conf: configmap: "partition-config" diff --git a/partition-core/pom.xml b/partition-core/pom.xml index 4a4945f105a0b9928e09631d7b713de293dd74fa..690a4035b1210727519a20057e834ab595de8506 100644 --- a/partition-core/pom.xml +++ b/partition-core/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>partition</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/pom.xml b/pom.xml index 76b4b09fdb82df561d5a978c1bfd8c47cd0e43ef..d17e7892d67a9fdcb6c41d185b9784263587add1 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu</groupId> <artifactId>partition</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <description>Partition Service</description> <properties> @@ -26,7 +26,7 @@ <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <os-core-common.version>0.11.0-SNAPSHOT</os-core-common.version> + <os-core-common.version>0.11.0</os-core-common.version> <org.springframework.boot.version>2.4.5</org.springframework.boot.version> </properties> @@ -128,6 +128,7 @@ <module>provider/partition-aws</module> <module>provider/partition-ibm</module> <module>provider/partition-gcp</module> + <module>provider/partition-reference</module> </modules> <profiles> diff --git a/provider/partition-aws/pom.xml b/provider/partition-aws/pom.xml index 134d5a7947a150de1daa78816e051021860e569f..ba22fe87b3a4c4e04bff83d1edfaa77252c94bcb 100644 --- a/provider/partition-aws/pom.xml +++ b/provider/partition-aws/pom.xml @@ -21,7 +21,7 @@ <parent> <artifactId>partition</artifactId> <groupId>org.opengroup.osdu</groupId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> diff --git a/provider/partition-azure/pom.xml b/provider/partition-azure/pom.xml index 51f79fe5b288ade9e27fd33d96908d08dc9d415b..4d9f57fafb3cf8bf0b78f59bf5bab7f18d455dd8 100644 --- a/provider/partition-azure/pom.xml +++ b/provider/partition-azure/pom.xml @@ -4,7 +4,7 @@ <parent> <artifactId>partition</artifactId> <groupId>org.opengroup.osdu</groupId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> diff --git a/provider/partition-gcp/pom.xml b/provider/partition-gcp/pom.xml index a5836540da905bacda9ff69bea3827e52b49444e..51adb10fb7cdb3d9d0e275d9c2f095c31cf8661d 100644 --- a/provider/partition-gcp/pom.xml +++ b/provider/partition-gcp/pom.xml @@ -5,7 +5,7 @@ <parent> <artifactId>partition</artifactId> <groupId>org.opengroup.osdu</groupId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> diff --git a/provider/partition-ibm/pom.xml b/provider/partition-ibm/pom.xml index ac87c614eb444dfe34041a7128ee93b5018de620..6e38079ba32f02d203d30e7084f3eb27654b3586 100644 --- a/provider/partition-ibm/pom.xml +++ b/provider/partition-ibm/pom.xml @@ -9,7 +9,7 @@ <parent> <artifactId>partition</artifactId> <groupId>org.opengroup.osdu</groupId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> @@ -41,6 +41,10 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> --> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-security</artifactId> + </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-oauth2-client</artifactId> @@ -112,11 +116,11 @@ <!-- Keycloak --> - <dependency> + <!-- <dependency> <groupId>org.keycloak</groupId> <artifactId>keycloak-spring-boot-starter</artifactId> <version>${version.keycloak}</version> - </dependency> + </dependency> --> <!-- <dependency> <groupId>org.keycloak</groupId> <artifactId>keycloak-spring-boot-starter-security</artifactId> diff --git a/provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/AuthorizationService.java b/provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/AuthorizationService.java index 7b5129829f5b99709541180bcb129d23e5e2136b..bf7676e5c993ab512a30c204b10690d0a1084981 100644 --- a/provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/AuthorizationService.java +++ b/provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/AuthorizationService.java @@ -3,14 +3,13 @@ package org.opengroup.osdu.partition.provider.ibm.security; -import org.keycloak.KeycloakPrincipal; -import org.keycloak.KeycloakSecurityContext; import org.opengroup.osdu.core.common.model.http.AppException; import org.opengroup.osdu.partition.provider.interfaces.IAuthorizationService; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.oauth2.jwt.Jwt; import org.springframework.stereotype.Component; import org.springframework.web.context.annotation.RequestScope; @@ -28,12 +27,14 @@ public class AuthorizationService implements IAuthorizationService { @Override public boolean isDomainAdminServiceAccount() { try { - final Authentication auth = SecurityContextHolder.getContext().getAuthentication(); - @SuppressWarnings("unchecked") - KeycloakPrincipal<KeycloakSecurityContext> principal = (KeycloakPrincipal<KeycloakSecurityContext>) auth.getPrincipal(); - String upn = principal.getName(); - log.info("email : "+upn); - if(upn.equals(partitionAdminUser)) { + final Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + Jwt principal = (Jwt) authentication.getPrincipal(); + String memberEmail = principal.getClaimAsString("email"); +// @SuppressWarnings("unchecked") +// KeycloakPrincipal<KeycloakSecurityContext> principal = (KeycloakPrincipal<KeycloakSecurityContext>) auth.getPrincipal(); +// String upn = principal.getName(); + log.debug("email : "+memberEmail); + if(memberEmail.equals(partitionAdminUser)) { return true; } else { diff --git a/provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/KeycloakSecurityConfig.java b/provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/KeycloakSecurityConfig.java deleted file mode 100644 index 3ba9984383b10f10b95914213f4ada91794108dc..0000000000000000000000000000000000000000 --- a/provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/KeycloakSecurityConfig.java +++ /dev/null @@ -1,56 +0,0 @@ -/* Licensed Materials - Property of IBM */ -/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ - -package org.opengroup.osdu.partition.provider.ibm.security; - -import org.keycloak.adapters.KeycloakConfigResolver; -import org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver; -import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider; -import org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurerAdapter; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.core.authority.mapping.SimpleAuthorityMapper; -import org.springframework.security.core.session.SessionRegistryImpl; -import org.springframework.security.web.authentication.session.NullAuthenticatedSessionStrategy; -import org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy; -import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; - -@Configuration -@EnableWebSecurity -@EnableGlobalMethodSecurity(prePostEnabled = true, jsr250Enabled = true) -public class KeycloakSecurityConfig extends KeycloakWebSecurityConfigurerAdapter { - - @Override - protected void configure(HttpSecurity http) throws Exception { - super.configure(http); - http.authorizeRequests() - .anyRequest().authenticated().and().oauth2ResourceServer().jwt(); - /* .anyRequest() - .permitAll();*/ - http.csrf().disable(); - http.headers().frameOptions().disable(); - } - - @Autowired - public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { - KeycloakAuthenticationProvider keycloakAuthenticationProvider = keycloakAuthenticationProvider(); - keycloakAuthenticationProvider.setGrantedAuthoritiesMapper(new SimpleAuthorityMapper()); - auth.authenticationProvider(keycloakAuthenticationProvider); - } - - @Bean - @Override - protected SessionAuthenticationStrategy sessionAuthenticationStrategy() { - return new NullAuthenticatedSessionStrategy(); - } - - @Bean - public KeycloakConfigResolver KeycloakConfigResolver() { - return new KeycloakSpringBootConfigResolver(); - } -} \ No newline at end of file diff --git a/provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/SecurityConfig.java b/provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/SecurityConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..0c899dfb1fe95325ce2c9669b2f3e9cec17165f5 --- /dev/null +++ b/provider/partition-ibm/src/main/java/org/opengroup/osdu/partition/provider/ibm/security/SecurityConfig.java @@ -0,0 +1,23 @@ +/* Licensed Materials - Property of IBM */ +/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ + +package org.opengroup.osdu.partition.provider.ibm.security; + +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + + +@EnableWebSecurity +@EnableGlobalMethodSecurity(prePostEnabled = true) +public class SecurityConfig extends WebSecurityConfigurerAdapter { + @Override + protected void configure(HttpSecurity http) throws Exception { + http.httpBasic().disable() + .csrf().disable().authorizeRequests().anyRequest() + .authenticated().and().oauth2ResourceServer().jwt(); + } +} + + diff --git a/provider/partition-reference/Dockerfile b/provider/partition-reference/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..325d26dc6e86b65be71a48afe3f172df6a0e5781 --- /dev/null +++ b/provider/partition-reference/Dockerfile @@ -0,0 +1,10 @@ +FROM openjdk:8-slim +WORKDIR /app +ARG PROVIDER_NAME +ENV PROVIDER_NAME $PROVIDER_NAME +ARG PORT +ENV PORT $PORT +# Copy the jar to the production image from the builder stage. +COPY provider/partition-${PROVIDER_NAME}/target/partition-${PROVIDER_NAME}-*-spring-boot.jar partition-${PROVIDER_NAME}.jar +# Run the web service on container startup. +CMD java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${PORT} -jar /app/partition-${PROVIDER_NAME}.jar diff --git a/provider/partition-reference/README.md b/provider/partition-reference/README.md new file mode 100644 index 0000000000000000000000000000000000000000..262136fc0217dfbd176ce7b190695c3ea1e57549 --- /dev/null +++ b/provider/partition-reference/README.md @@ -0,0 +1,176 @@ +# Partition Service +os-partition-reference is a [Spring Boot](https://spring.io/projects/spring-boot) service that is responsible for creating and retrieving partition specific properties on behalf of other services whether they are secret values or not. + +## Getting Started +These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. + +### Prerequisites +Pre-requisites + +* GCloud SDK with java (latest version) +* JDK 8 +* Lombok 1.16 or later +* Maven + +### Installation +In order to run the service locally or remotely, you will need to have the following environment variables defined. + +| name | value | description | sensitive? | source | +| --- | --- | --- | --- | --- | +| `LOG_PREFIX` | `service` | Logging prefix | no | - | +| `SERVER_SERVLET_CONTEXPATH` | `/api/partition/v1` | Servlet context path | no | - | +| `AUTHORIZE_API` | ex `https://entitlements.com/entitlements/v1` | Entitlements API endpoint | no | output of infrastructure deployment | +| `GOOGLE_CLOUD_PROJECT` | ex `osdu-cicd-epam` | Google Cloud Project Id| no | output of infrastructure deployment | +| `GOOGLE_AUDIENCES` | ex `*****.apps.googleusercontent.com` | Client ID for getting access to cloud resources | yes | https://console.cloud.google.com/apis/credentials | +| `PARTITION_ADMIN_ACCOUNTS` | ex `admin@domen.iam.gserviceaccount.com,osdu-gcp-sa,workload-identity` | List of partition admin account emails, could be in full form like `admin@domen.iam.gserviceaccount.com` or in `starts with` pattern like `osdu-gcp-sa`| no | - | +| `GOOGLE_APPLICATION_CREDENTIALS` | ex `/path/to/directory/service-key.json` | Service account credentials, you only need this if running locally | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | +| `KEY_RING` | ex `csqp` | A key ring holds keys in a specific Google Cloud location and permit us to manage access control on groups of keys | yes | https://cloud.google.com/kms/docs/resource-hierarchy#key_rings | +| `KMS_KEY` | ex `partitionService` | A key exists on one key ring linked to a specific location. | yes | https://cloud.google.com/kms/docs/resource-hierarchy#key_rings | +| `MONGO_DB_URL` | ex `mongodb://localhost:27017` | Mongo DB Url| yes | output of infrastructure deployment | +| `MONGO_DB_USER` | ex `mongouser` | Mongo DB userName| yes | output of infrastructure deployment | +| `MONGO_DB_PASSWORD` | ex `mongopassword` | Mongo DB userPassword| yes | output of infrastructure deployment | +| `MONGO_DB_NAME` | ex `mongoDBName` | Mongo DB DbName| yes | output of infrastructure deployment | + +### Run Locally +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 may need to configure access to the remote maven repository that holds the OSDU dependencies. This file should live within `~/.mvn/community-maven.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>community-maven-via-private-token</id> + <!-- 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 --> + <configuration> + <httpHeaders> + <property> + <name>Private-Token</name> + <value>${env.COMMUNITY_MAVEN_TOKEN}</value> + </property> + </httpHeaders> + </configuration> + </server> + </servers> +</settings> +``` +* Update the Google cloud SDK to the latest version: + +```bash +gcloud components update +``` +* Set Google Project Id: + +```bash +gcloud config set project <YOUR-PROJECT-ID> +``` + +* Perform a basic authentication in the selected project: + +```bash +gcloud auth application-default login +``` + +* Navigate to partition service's root folder and run: + +```bash +mvn clean install +``` + +* If you wish to see the coverage report then go to target/site/jacoco/index.html and open index.html + +* If you wish to build the project without running tests + +```bash +mvn clean install -DskipTests +``` + +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 +cd provider/partition-reference/ && mvn spring-boot:run +``` + +## Testing +Navigate to partition service's root folder and run all the tests: + +```bash +# build + install integration test core +$ (cd testing/partition-test-core/ && mvn clean install) +``` + +### Running E2E Tests +This section describes how to run cloud OSDU E2E tests (testing/partition-test-gcp). + +You will need to have the following environment variables defined. + +| name | value | description | sensitive? | source | +| --- | --- | --- | --- | --- | +| `ENVIRONMENT` | ex `dev` | | no | | +| `PARTITION_BASE_URL` | ex `http://localhost:8080/` | service base URL | yes | | +| `CLIENT_TENANT` | ex `opendes` | name of the client partition | yes | | +| `MY_TENANT` | ex `opendes` | name of the OSDU partition | yes | | +| `INTEGRATION_TESTER` | `********` | Service account for API calls. Note: this user must be `PARTITION_ADMIN_ACCOUNT` | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | +| `NO_DATA_ACCESS_TESTER` | `********` | Service account base64 encoded string without data access | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | +| `INTEGRATION_TEST_AUDIENCE` | `********` | client application ID | yes | https://console.cloud.google.com/apis/credentials | + +Execute following command to build code and run all the integration tests: + +```bash +# Note: this assumes that the environment variables for integration tests as outlined +# above are already exported in your environment. +$ (cd testing/partition-test-gcp/ && mvn clean test) +``` + +## Deployment +GKE Google Documentation: https://cloud.google.com/build/docs/deploying-builds/deploy-gke +Anthos Google Documentation: https://cloud.google.com/anthos/multicluster-management/gateway/tutorials/cloud-build-integration + +#### Cloud KMS Setup + +Enable cloud KMS on master project. + +Create king ring and key in the ***master project*** + +```bash + gcloud services enable cloudkms.googleapis.com + export KEYRING_NAME="csqp" + export CRYPTOKEY_NAME="partionService" + gcloud kms keyrings create $KEYRING_NAME --location global + gcloud kms keys create $CRYPTOKEY_NAME --location global \ + --keyring $KEYRING_NAME \ + --purpose encryption +``` + +Add **Cloud KMS CryptoKey Encrypter/Decrypter** role to the used **service account** by Partition Service of the ***master project*** through IAM - Role tab. + +Add "Cloud KMS Encrypt/Decrypt" role to the used **service account** by Partition Service of the ***master project*** through IAM - Role tab. + +## Licence +Copyright © Google LLC +Copyright © EPAM Systems + +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. diff --git a/provider/partition-reference/docker-compose.yml b/provider/partition-reference/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..6dddee763f1007b120109e42ca361c1eaa25308b --- /dev/null +++ b/provider/partition-reference/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3" +services: + os-storage-app: + build: + args: + JAR_FILE: target/partition-reference-0.12.0-SNAPSHOT-spring-boot.jar + context: "" + dockerfile: ../Dockerfile + image: us.gcr.io/osdu-anthos-02/os-partition/anthos-partition-reference + ports: + - "8080:8080" + diff --git a/provider/partition-reference/kubernetes/deployments/deployment-os-partition-service.yml b/provider/partition-reference/kubernetes/deployments/deployment-os-partition-service.yml new file mode 100644 index 0000000000000000000000000000000000000000..b53d96b59ef926c451c24f90dac615b3a0f68fda --- /dev/null +++ b/provider/partition-reference/kubernetes/deployments/deployment-os-partition-service.yml @@ -0,0 +1,120 @@ +apiVersion: v1 +data: + AUTHORIZE_API: ${AUTHORIZE_API} + MONGO_DB_URL: ${MONGO_DB_URL} + MONGO_DB_USER: ${MONGO_DB_USER} + MONGO_DB_NAME: ${MONGO_DB_NAME} + GOOGLE_CLOUD_PROJECT: ${GOOGLE_CLOUD_PROJECT} + GOOGLE_AUDIENCES: ${GOOGLE_AUDIENCES} + KEY_RING: ${KEY_RING} + KMS_KEY: ${KMS_KEY} + PARTITION_ADMIN_ACCOUNTS: ${PARTITION_ADMIN_ACCOUNTS} + LOG_LEVEL: ${LOG_LEVEL} + +kind: ConfigMap +metadata: + labels: + app: partition-reference + name: partition-config + namespace: default +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + generateName: partition-reference-anthos + labels: + app: partition-reference + name: partition-reference + namespace: default +spec: + selector: + matchLabels: + app: partition-reference + replicas: 1 + template: + metadata: + labels: + app: partition-reference + spec: + containers: + - env: + - name: AUTHORIZE_API + valueFrom: + configMapKeyRef: + key: AUTHORIZE_API + name: partition-config + - name: PARTITION_ADMIN_ACCOUNTS + valueFrom: + configMapKeyRef: + key: PARTITION_ADMIN_ACCOUNTS + name: partition-config + - name: LOG_LEVEL + valueFrom: + configMapKeyRef: + key: LOG_LEVEL + name: partition-config + - name: MONGO_DB_URL + valueFrom: + configMapKeyRef: + key: MONGO_DB_URL + name: partition-config + - name: MONGO_DB_USER + valueFrom: + configMapKeyRef: + key: MONGO_DB_USER + name: partition-config + - name: MONGO_DB_PASSWORD + valueFrom: + secretKeyRef: + name: partition-secret + key: mongo.db.password + - name: MONGO_DB_NAME + valueFrom: + configMapKeyRef: + key: MONGO_DB_NAME + name: partition-config + - name: GOOGLE_CLOUD_PROJECT + valueFrom: + configMapKeyRef: + key: GOOGLE_CLOUD_PROJECT + name: partition-config + - name: GOOGLE_AUDIENCES + valueFrom: + configMapKeyRef: + key: GOOGLE_AUDIENCES + name: partition-config + - name: KEY_RING + valueFrom: + configMapKeyRef: + key: KEY_RING + name: partition-config + - name: KMS_KEY + valueFrom: + configMapKeyRef: + key: KMS_KEY + name: partition-config + image: us.gcr.io/osdu-anthos-02/os-partition/anthos-partition-reference:9966597-dirty + name: partition-reference +--- +apiVersion: v1 +kind: Service +metadata: + name: partition-reference + namespace: default +spec: + ports: + - protocol: TCP + port: 80 + targetPort: 8080 + selector: + app: partition-reference + type: LoadBalancer +--- +apiVersion: v1 +data: + mongo.db.password: ${mongo.db.password} +kind: Secret +metadata: + name: partition-secret + namespace: default +type: Opaque \ No newline at end of file diff --git a/provider/partition-reference/pom.xml b/provider/partition-reference/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..cfdeb0b28db81172f3a4067ec3f74f2d443c17b7 --- /dev/null +++ b/provider/partition-reference/pom.xml @@ -0,0 +1,126 @@ +<?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"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.opengroup.osdu</groupId> + <artifactId>partition</artifactId> + <version>0.12.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> + </parent> + + <groupId>org.opengroup.osdu</groupId> + <artifactId>partition-reference</artifactId> + <description>Partition service on Hybrid Cloud</description> + <version>0.12.0-SNAPSHOT</version> + <packaging>jar</packaging> + + <dependencies> + <!-- Internal packages --> + <dependency> + <groupId>org.opengroup.osdu</groupId> + <artifactId>partition-core</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.opengroup.osdu</groupId> + <artifactId>core-lib-gcp</artifactId> + <version>0.10.0</version> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-mongodb</artifactId> + </dependency> + + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + </dependency> + + <dependency> + <groupId>ch.qos.logback.contrib</groupId> + <artifactId>logback-json-classic</artifactId> + <version>0.1.5</version> + </dependency> + + <!-- Test Dependencies --> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-api-mockito2</artifactId> + <version>2.0.2</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-junit4</artifactId> + <version>2.0.2</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>3.0.0</version> + <scope>test</scope> + </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.partition.provider.reference.PartitionReferenceApplication + </mainClass> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>0.7.7.201606060606</version> + <executions> + <execution> + <goals> + <goal>prepare-agent</goal> + </goals> + </execution> + <execution> + <id>report</id> + <phase>prepare-package</phase> + <goals> + <goal>report</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/PartitionReferenceApplication.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/PartitionReferenceApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..75693d22b52d6c234794139da8cd6e951791096e --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/PartitionReferenceApplication.java @@ -0,0 +1,32 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration; +import org.springframework.context.annotation.ComponentScan; + +@ComponentScan({"org.opengroup.osdu"}) +@SpringBootApplication(exclude = {MongoAutoConfiguration.class}) +public class PartitionReferenceApplication { + + public static void main(String[] args) { + SpringApplication.run(PartitionReferenceApplication.class, args); + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/CredentialsCache.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/CredentialsCache.java new file mode 100644 index 0000000000000000000000000000000000000000..b154aecbceaf1cbfcd6fa1408fcd248b74e5ef49 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/CredentialsCache.java @@ -0,0 +1,30 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference.cache; + +import org.opengroup.osdu.core.common.cache.VmCache; +import org.opengroup.osdu.core.gcp.multitenancy.credentials.GcsCredential; +import org.springframework.stereotype.Component; + +@Component +public class CredentialsCache extends VmCache<String, GcsCredential> { + + public CredentialsCache() { + super(30, 1000); + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/GroupCache.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/GroupCache.java new file mode 100644 index 0000000000000000000000000000000000000000..16315a83bb231b73b7db0d20f32e388567e68dc3 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/GroupCache.java @@ -0,0 +1,30 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference.cache; + +import org.opengroup.osdu.core.common.cache.VmCache; +import org.opengroup.osdu.core.common.model.entitlements.Groups; +import org.springframework.stereotype.Component; + +@Component +public class GroupCache extends VmCache<String, Groups> { + + public GroupCache() { + super(30, 1000); + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/PartitionListCacheImpl.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/PartitionListCacheImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..83853f6c938857db57bdd0881e623e05be0f6259 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/PartitionListCacheImpl.java @@ -0,0 +1,53 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference.cache; + +import java.util.List; +import lombok.RequiredArgsConstructor; +import org.opengroup.osdu.core.common.cache.ICache; +import org.opengroup.osdu.partition.provider.interfaces.IPartitionServiceCache; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Service; + +@Service +@Qualifier("partitionListCache") +@RequiredArgsConstructor +public class PartitionListCacheImpl implements IPartitionServiceCache<String, List<String>> { + + private final ICache<String, List<String>> cache; + + @Override + public void put(String s, List<String> o) { + this.cache.put(s, o); + } + + @Override + public List<String> get(String s) { + return this.cache.get(s); + } + + @Override + public void delete(String s) { + this.cache.delete(s); + } + + @Override + public void clearAll() { + this.cache.clearAll(); + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/PartitionServiceCacheImpl.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/PartitionServiceCacheImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..55a0c33ead57b2f6668c23b45790025932937b22 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/PartitionServiceCacheImpl.java @@ -0,0 +1,52 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference.cache; + +import lombok.RequiredArgsConstructor; +import org.opengroup.osdu.core.common.cache.ICache; +import org.opengroup.osdu.partition.model.PartitionInfo; +import org.opengroup.osdu.partition.provider.interfaces.IPartitionServiceCache; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Service; + +@Service +@Qualifier("partitionServiceCache") +@RequiredArgsConstructor +public class PartitionServiceCacheImpl implements IPartitionServiceCache<String, PartitionInfo> { + + private final ICache<String, PartitionInfo> cache; + + @Override + public void put(String s, PartitionInfo o) { + this.cache.put(s, o); + } + + @Override + public PartitionInfo get(String s) { + return this.cache.get(s); + } + + @Override + public void delete(String s) { + this.cache.delete(s); + } + + @Override + public void clearAll() { + this.cache.clearAll(); + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/VmCacheConfiguration.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/VmCacheConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..ba98db953e50f3ddbe841ff52a0f16892be0cbef --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/cache/VmCacheConfiguration.java @@ -0,0 +1,47 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference.cache; + +import java.util.List; +import lombok.RequiredArgsConstructor; +import org.opengroup.osdu.core.common.cache.VmCache; +import org.opengroup.osdu.partition.model.PartitionInfo; +import org.opengroup.osdu.partition.provider.reference.config.PropertiesConfiguration; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +@RequiredArgsConstructor +public class VmCacheConfiguration { + + private final PropertiesConfiguration properties; + + @Bean(name = "partitionListCache") + public VmCache<String, List<String>> partitionListCache() { + return new VmCache<>(this.properties.getCacheExpiration() * 60, + this.properties.getCacheMaxSize()); + } + + @ConfigurationProperties + @Bean(name = "partitionServiceCache") + public VmCache<String, PartitionInfo> partitionServiceCache() { + return new VmCache<>(this.properties.getCacheExpiration() * 60, + this.properties.getCacheMaxSize()); + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/config/IDTokenVerifierConfiguration.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/config/IDTokenVerifierConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..eeb175e33a1e77a035c76abb0aa3823782726726 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/config/IDTokenVerifierConfiguration.java @@ -0,0 +1,44 @@ +/* + * Copyright 2021 Google LLC + * Copyright 2021 EPAM Systems, Inc + * + * 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 + * + * https://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.partition.provider.reference.config; + +import com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier; +import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; +import com.google.api.client.json.jackson2.JacksonFactory; +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.util.Collections; +import lombok.RequiredArgsConstructor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +@RequiredArgsConstructor +public class IDTokenVerifierConfiguration { + + private final PropertiesConfiguration configuration; + + @Bean + public GoogleIdTokenVerifier buildTokenVerifier() throws GeneralSecurityException, IOException { + return new GoogleIdTokenVerifier.Builder( + GoogleNetHttpTransport.newTrustedTransport(), + JacksonFactory.getDefaultInstance()) + .setAudience(Collections.singleton(configuration.getGoogleAudiences())) + .build(); + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/config/MongoDBConfigProperties.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/config/MongoDBConfigProperties.java new file mode 100644 index 0000000000000000000000000000000000000000..848402ee4ac1fe9d5eb2b2ccbefa50b250db1dc9 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/config/MongoDBConfigProperties.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Google LLC + * Copyright 2021 EPAM Systems, Inc + * + * 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 + * + * https://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.partition.provider.reference.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Configuration +@ConfigurationProperties +@Data +public class MongoDBConfigProperties { + + private String mongoDbUrl; + private String mongoDbUser; + private String mongoDbPassword; + private String mongoDbName; +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/config/PropertiesConfiguration.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/config/PropertiesConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..644ed5736a93646962d2ce55f9227da41133fbf8 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/config/PropertiesConfiguration.java @@ -0,0 +1,51 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference.config; + +import java.util.List; +import java.util.Objects; +import javax.annotation.PostConstruct; +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Configuration +@ConfigurationProperties +@Data +public class PropertiesConfiguration { + + private String googleAudiences; + + private List<String> partitionAdminAccounts; + + private String googleCloudProject; + + private int cacheExpiration; + + private int cacheMaxSize; + + private String serviceAccountTail; + + @PostConstruct + public void setUp() { + if (Objects.isNull(serviceAccountTail) || serviceAccountTail.isEmpty()) { + this.serviceAccountTail = googleCloudProject + ".iam.gserviceaccount.com"; + } + } + +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/model/PartitionPropertyDocument.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/model/PartitionPropertyDocument.java new file mode 100644 index 0000000000000000000000000000000000000000..93db9614107fdfecfe79cf236317f1004225da75 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/model/PartitionPropertyDocument.java @@ -0,0 +1,36 @@ +/* + * Copyright 2021 Google LLC + * Copyright 2021 EPAM Systems, Inc + * + * 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 + * + * https://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.partition.provider.reference.model; + +import java.util.HashMap; +import java.util.Map; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.opengroup.osdu.partition.model.Property; +import org.springframework.data.mongodb.core.mapping.Document; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Document(collection = "Partitions") +public class PartitionPropertyDocument { + + private String partitionId; + private Map<String, Property> properties = new HashMap<>(); +} \ No newline at end of file diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/persistence/MongoDdmsClient.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/persistence/MongoDdmsClient.java new file mode 100644 index 0000000000000000000000000000000000000000..c74ff5af8c2d70028e34051e816eec773d185568 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/persistence/MongoDdmsClient.java @@ -0,0 +1,38 @@ +/* + * Copyright 2021 Google LLC + * Copyright 2021 EPAM Systems, Inc + * + * 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 + * + * https://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.partition.provider.reference.persistence; + +import com.mongodb.client.MongoCollection; +import org.bson.Document; +import org.opengroup.osdu.partition.provider.reference.util.MongoClientHandler; +import org.springframework.stereotype.Component; + +@Component +public class MongoDdmsClient { + + private MongoClientHandler mongoClientHandler; + + public MongoDdmsClient(MongoClientHandler mongoClientHandler) { + this.mongoClientHandler = mongoClientHandler; + } + + public MongoCollection<Document> getMongoCollection(String dbName, String collectionName) { + return mongoClientHandler.getMongoClient().getDatabase(dbName) + .getCollection(collectionName); + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/repository/PartitionPropertyEntityRepository.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/repository/PartitionPropertyEntityRepository.java new file mode 100644 index 0000000000000000000000000000000000000000..cf339e64b27d960c9c4db45240a6b7e54e858710 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/repository/PartitionPropertyEntityRepository.java @@ -0,0 +1,153 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference.repository; + +import static com.mongodb.client.model.Filters.eq; + +import com.google.gson.Gson; +import com.mongodb.client.FindIterable; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.model.ReplaceOptions; +import com.mongodb.client.result.DeleteResult; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import org.bson.Document; +import org.opengroup.osdu.partition.model.PartitionInfo; +import org.opengroup.osdu.partition.model.Property; +import org.opengroup.osdu.partition.provider.reference.model.PartitionPropertyDocument; +import org.opengroup.osdu.partition.provider.reference.persistence.MongoDdmsClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + +@Repository +public class PartitionPropertyEntityRepository { + + protected static final String PARTITIONS = "Partitions"; + protected static final String PARTITIONS_DATABASE = "PartitionsDB"; + protected static final String PARTITION_ID = "partitionId"; + private final MongoDdmsClient mongoDdmsClient; + + @Autowired + public PartitionPropertyEntityRepository(MongoDdmsClient mongoDdmsClient) { + this.mongoDdmsClient = mongoDdmsClient; + } + + public Optional<PartitionInfo> createPartition(String partitionId, PartitionInfo partitionInfo) { + if (Objects.nonNull(partitionInfo) && Objects.nonNull(partitionId)) { + MongoCollection<Document> mongoCollection = mongoDdmsClient + .getMongoCollection(PARTITIONS_DATABASE, PARTITIONS); + PartitionPropertyDocument partitionPropertyDocument = convertToPartitionPropertyDocument( + partitionId, partitionInfo); + mongoCollection.replaceOne(eq(PARTITION_ID, partitionId), + Document.parse(new Gson().toJson(partitionPropertyDocument)), + new ReplaceOptions().upsert(true)); + return Optional.ofNullable(partitionInfo); + } + return Optional.empty(); + } + + public Optional<PartitionInfo> updatePartition(String partitionId, PartitionInfo partitionInfo) { + if (Objects.nonNull(partitionInfo) && Objects.nonNull(partitionId)) { + MongoCollection<Document> mongoCollection = mongoDdmsClient + .getMongoCollection(PARTITIONS_DATABASE, PARTITIONS); + Document result = mongoCollection.find(eq(PARTITION_ID, partitionId)).first(); + PartitionPropertyDocument partitionPropertyDocument = new Gson().fromJson(result.toJson(), + PartitionPropertyDocument.class); + partitionPropertyDocument.getProperties().putAll(partitionInfo.getProperties()); + + mongoCollection.replaceOne(eq(PARTITION_ID, partitionId), + Document.parse(new Gson().toJson(partitionPropertyDocument)), + new ReplaceOptions().upsert(true)); + return Optional.ofNullable(partitionInfo); + } + return Optional.empty(); + } + + public Optional<PartitionInfo> findByPartitionId(String partitionId) { + if (Objects.nonNull(partitionId)) { + MongoCollection<Document> mongoCollection = mongoDdmsClient + .getMongoCollection(PARTITIONS_DATABASE, PARTITIONS); + Document result = mongoCollection.find(eq(PARTITION_ID, partitionId)).first(); + if (Objects.nonNull(result)) { + PartitionPropertyDocument partitionPropertyDocument = new Gson().fromJson(result.toJson(), + PartitionPropertyDocument.class); + PartitionInfo partitionInfo = convertToPartitionInfo(partitionPropertyDocument); + return Optional.ofNullable(partitionInfo); + } + } + return Optional.empty(); + } + + public List<String> getAllPartitions() { + MongoCollection<Document> mongoCollection = mongoDdmsClient + .getMongoCollection(PARTITIONS_DATABASE, PARTITIONS); + + FindIterable<Document> results = mongoCollection.find(); + List<String> partitionsIds = new ArrayList<>(); + for (Document document : results) { + PartitionPropertyDocument partitionPropertyDocument = new Gson().fromJson(document.toJson(), + PartitionPropertyDocument.class); + partitionsIds.add(partitionPropertyDocument.getPartitionId()); + } + return partitionsIds; + } + + public boolean isDeletedPartitionInfoByPartitionId(String partitionId) { + if (Objects.nonNull(partitionId)) { + MongoCollection<Document> mongoCollection = mongoDdmsClient + .getMongoCollection(PARTITIONS_DATABASE, PARTITIONS); + DeleteResult result = mongoCollection.deleteMany(eq(PARTITION_ID, partitionId)); + return result.wasAcknowledged(); + } + return false; + } + + public Optional<Property> findByPartitionIdAndName(String partitionId, String key) { + if (Objects.nonNull(partitionId) && Objects.nonNull(key)) { + MongoCollection<Document> mongoCollection = mongoDdmsClient + .getMongoCollection(PARTITIONS_DATABASE, PARTITIONS); + Document result = mongoCollection.find(eq(PARTITION_ID, partitionId)).first(); + if (Objects.nonNull(result)) { + PartitionPropertyDocument partitionPropertyDocument = new Gson().fromJson(result.toJson(), + PartitionPropertyDocument.class); + Property property = partitionPropertyDocument.getProperties().get(key); + if (Objects.nonNull(property)) { + return Optional.ofNullable(property); + } + } + } + return Optional.empty(); + } + + private PartitionPropertyDocument convertToPartitionPropertyDocument( + String partitionId, PartitionInfo partitionInfo) { + PartitionPropertyDocument partitionPropertyDocument = new PartitionPropertyDocument(); + partitionPropertyDocument.setPartitionId(partitionId); + partitionPropertyDocument.setProperties(partitionInfo.getProperties()); + return partitionPropertyDocument; + } + + private PartitionInfo convertToPartitionInfo( + PartitionPropertyDocument partitionPropertyDocument) { + PartitionInfo partitionInfo = new PartitionInfo(); + partitionInfo.setProperties(partitionPropertyDocument.getProperties()); + return partitionInfo; + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/security/AuthorizationService.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/security/AuthorizationService.java new file mode 100644 index 0000000000000000000000000000000000000000..30a6c7e2c5d7222243ba1dd83bed05e06b013f7a --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/security/AuthorizationService.java @@ -0,0 +1,93 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference.security; + +import com.google.api.client.googleapis.auth.oauth2.GoogleIdToken; +import com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier; +import java.util.List; +import java.util.Objects; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.opengroup.osdu.core.common.model.http.AppException; +import org.opengroup.osdu.core.common.model.http.DpsHeaders; +import org.opengroup.osdu.partition.provider.interfaces.IAuthorizationService; +import org.opengroup.osdu.partition.provider.reference.config.PropertiesConfiguration; +import org.springframework.stereotype.Component; +import org.springframework.web.context.annotation.RequestScope; + +@Slf4j +@Component +@RequestScope +@RequiredArgsConstructor +public class AuthorizationService implements IAuthorizationService { + + private final PropertiesConfiguration configuration; + + private final DpsHeaders headers; + + private final GoogleIdTokenVerifier verifier; + + @Override + public boolean isDomainAdminServiceAccount() { + if (Objects.isNull(headers.getAuthorization()) || headers.getAuthorization().isEmpty()) { + throw AppException.createUnauthorized("No JWT token. Access is Forbidden"); + } + String email = null; + try { + String authorization = headers.getAuthorization().replace("Bearer ", ""); + GoogleIdToken googleIdToken = verifier.verify(authorization); + if (Objects.isNull(googleIdToken)) { + log.warn("Not valid token provided"); + throw AppException.createUnauthorized("Unauthorized. The JWT token could not be validated"); + } + email = googleIdToken.getPayload().getEmail(); + List<String> partitionAdminAccounts = configuration.getPartitionAdminAccounts(); + if (Objects.nonNull(partitionAdminAccounts) && !partitionAdminAccounts.isEmpty()) { + return isAllowedAccount(email); + } else { + if (StringUtils.endsWith(email, configuration.getServiceAccountTail())) { + return true; + } else { + throw AppException.createUnauthorized( + String.format("Unauthorized. The user %s is not Service Principal", email)); + } + } + } catch (AppException e){ + throw e; + } catch (Exception ex) { + log.warn(String.format("User %s is not unauthorized. %s.", email, ex)); + throw AppException.createUnauthorized("Unauthorized. The JWT token could not be validated"); + } + } + + private boolean isAllowedAccount(String accountEmail) { + if (StringUtils.endsWith(accountEmail, configuration.getServiceAccountTail())) { + for (String partitionAdmin : configuration.getPartitionAdminAccounts()) { + if (partitionAdmin.equals(accountEmail)) { + return true; + } + if (StringUtils.startsWith(accountEmail, partitionAdmin)) { + return true; + } + } + } + throw AppException + .createUnauthorized(String.format("Unauthorized. The user %s is untrusted.", accountEmail)); + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/security/SecurityConfigReference.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/security/SecurityConfigReference.java new file mode 100644 index 0000000000000000000000000000000000000000..046a2aeeb942e866d5f5b604940a401d3b8d0bf0 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/security/SecurityConfigReference.java @@ -0,0 +1,43 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference.security; + +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; + +@EnableWebSecurity +@Configuration +@EnableGlobalMethodSecurity(prePostEnabled = true) +public class SecurityConfigReference extends WebSecurityConfigurerAdapter { + + @Override + protected void configure(HttpSecurity http) throws Exception { + http.httpBasic().disable() + .csrf().disable(); + } + + @Override + public void configure(WebSecurity web) throws Exception { + web.ignoring().antMatchers("/api-docs") + .antMatchers("/swagger"); + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/service/PartitionServiceImpl.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/service/PartitionServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..32bf72832d9d711e5e1ada19bb4432c070fc79d1 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/service/PartitionServiceImpl.java @@ -0,0 +1,124 @@ +/* + Copyright 2002-2021 Google LLC + Copyright 2002-2021 EPAM Systems, Inc + + 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.partition.provider.reference.service; + +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import lombok.RequiredArgsConstructor; +import org.apache.http.HttpStatus; +import org.opengroup.osdu.core.common.model.http.AppException; +import org.opengroup.osdu.core.common.provider.interfaces.IKmsClient; +import org.opengroup.osdu.partition.logging.AuditLogger; +import org.opengroup.osdu.partition.model.PartitionInfo; +import org.opengroup.osdu.partition.model.Property; +import org.opengroup.osdu.partition.provider.interfaces.IPartitionService; +import org.opengroup.osdu.partition.provider.reference.repository.PartitionPropertyEntityRepository; +import org.springframework.stereotype.Service; + +@Service +@RequiredArgsConstructor +public class PartitionServiceImpl implements IPartitionService { + + private static final String UNKNOWN_ERROR_REASON = "unknown error"; + + private final PartitionPropertyEntityRepository partitionPropertyEntityRepository; + + private final IKmsClient kmsClient; + + private final AuditLogger auditLogger; + + @Override + public PartitionInfo createPartition(String partitionId, PartitionInfo partitionInfo) { + if (partitionPropertyEntityRepository.findByPartitionId(partitionId).isPresent()) { + throw new AppException(HttpStatus.SC_CONFLICT, UNKNOWN_ERROR_REASON, + "Partition already exists."); + } + partitionInfo.getProperties() + .forEach((key, property) -> encryptPartitionPropertyEntityIfNeeded(property)); + partitionPropertyEntityRepository.createPartition(partitionId, partitionInfo); + return getPartition(partitionId); + } + + @Override + public PartitionInfo updatePartition(String partitionId, PartitionInfo partitionInfo) { + if (partitionInfo.getProperties().containsKey("id")) { + this.auditLogger.updatePartitionSecretFailure(Collections.singletonList(partitionId)); + throw new AppException(HttpStatus.SC_BAD_REQUEST, "can not update id", + "the field id can not be updated"); + } + if (!partitionPropertyEntityRepository.findByPartitionId(partitionId).isPresent()) { + this.auditLogger.updatePartitionSecretFailure(Collections.singletonList(partitionId)); + throw new AppException(HttpStatus.SC_NOT_FOUND, UNKNOWN_ERROR_REASON, + "An attempt to update not existing partition."); + } + partitionInfo.getProperties().forEach((key, value) -> { + Optional<Property> property = this.partitionPropertyEntityRepository + .findByPartitionIdAndName(partitionId, key); + if (property.isPresent()) { + property.get().setSensitive(value.isSensitive()); + property.get().setValue(value.getValue()); + encryptPartitionPropertyEntityIfNeeded(property.get()); + } + encryptPartitionPropertyEntityIfNeeded(value); + }); + partitionPropertyEntityRepository.updatePartition(partitionId, partitionInfo); + return getPartition(partitionId); + } + + @Override + public PartitionInfo getPartition(String partitionId) { + Optional<PartitionInfo> result = partitionPropertyEntityRepository.findByPartitionId( + partitionId); + if (result.isPresent()) { + result.get().getProperties() + .forEach((key, property) -> decryptPartitionPropertyIfNeeded(property)); + return result.get(); + } + return new PartitionInfo(); + } + + @Override + public boolean deletePartition(String partitionId) { + if (!partitionPropertyEntityRepository.findByPartitionId(partitionId).isPresent()) { + this.auditLogger.deletePartitionFailure(Collections.singletonList(partitionId)); + throw new AppException(HttpStatus.SC_NOT_FOUND, UNKNOWN_ERROR_REASON, + "An attempt to delete not existing partition."); + } + return partitionPropertyEntityRepository.isDeletedPartitionInfoByPartitionId(partitionId); + } + + @Override + public List<String> getAllPartitions() { + return partitionPropertyEntityRepository.getAllPartitions(); + } + + private void encryptPartitionPropertyEntityIfNeeded(Property property) { + if (property.isSensitive()) { + String propertyValue = property.getValue().toString(); + property.setValue("this.kmsClient.encryptString " + propertyValue); + } + } + + private void decryptPartitionPropertyIfNeeded(Property property) { + if (property.isSensitive()) { + String propertyValue = property.getValue().toString(); + property.setValue("this.kmsClient.decryptString " + propertyValue); + } + } +} diff --git a/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/util/MongoClientHandler.java b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/util/MongoClientHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..0a282164acc3a1c1f487e34f6fdadf7dfce6fc25 --- /dev/null +++ b/provider/partition-reference/src/main/java/org/opengroup/osdu/partition/provider/reference/util/MongoClientHandler.java @@ -0,0 +1,75 @@ +/* + * Copyright 2021 Google LLC + * Copyright 2021 EPAM Systems, Inc + * + * 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 + * + * https://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.partition.provider.reference.util; + +import com.mongodb.ConnectionString; +import com.mongodb.MongoClientSettings; +import com.mongodb.client.MongoClient; +import com.mongodb.client.MongoClients; +import org.apache.http.HttpStatus; +import org.opengroup.osdu.core.common.model.http.AppException; +import org.opengroup.osdu.partition.provider.reference.config.MongoDBConfigProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class MongoClientHandler { + + private static final String MONGO_PREFIX = "mongodb://"; + private static final String MONGO_OPTIONS = "retryWrites=true&w=majority&maxIdleTimeMS=10000"; + + private MongoClient mongoClient = null; + private MongoDBConfigProperties mongoDBConfigProperties; + + private MongoClient getOrInitMongoClient() { + if (mongoClient != null) { + return mongoClient; + } + + final String connectionString = String.format("%s%s:%s@%s/?%s", + MONGO_PREFIX, + mongoDBConfigProperties.getMongoDbUser(), + mongoDBConfigProperties.getMongoDbPassword(), + mongoDBConfigProperties.getMongoDbUrl(), + MONGO_OPTIONS); + ConnectionString connString = new ConnectionString(connectionString); + MongoClientSettings settings = MongoClientSettings.builder() + .applyConnectionString(connString) + .retryWrites(true) + .build(); + try { + mongoClient = MongoClients.create(settings); + } catch (Exception ex) { + throw new AppException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "Error connecting MongoDB", + ex.getMessage(), ex); + } + return mongoClient; + } + + public MongoClient getMongoClient() { + if (mongoClient == null) { + getOrInitMongoClient(); + } + return mongoClient; + } + + @Autowired + public void setMongoDBConfigProperties(MongoDBConfigProperties mongoDBConfigProperties) { + this.mongoDBConfigProperties = mongoDBConfigProperties; + } +} diff --git a/provider/partition-reference/src/main/resources/application.properties b/provider/partition-reference/src/main/resources/application.properties new file mode 100644 index 0000000000000000000000000000000000000000..96e336328093735d92d0c6c17393fe769ee778b3 --- /dev/null +++ b/provider/partition-reference/src/main/resources/application.properties @@ -0,0 +1,35 @@ +LOG_PREFIX=partition +server.servlet.contextPath=/api/partition/v1 +logging.level.org.springframework.web=${LOG_LEVEL:DEBUG} +server.port=8080 +springfox.documentation.swagger.v2.path=/api-docs + +management.endpoint.health.show-details=always +management.health.diskspace.enabled=false + +authorize-api=https://os-entitlements-gcp-jvmvia5dea-uc.a.run.app/entitlements/v1 + +#ACCEPT_HTTP=true + +cache-expiration=1 +cache-maxSize=1000 + +key-ring=csqp +kms-key=searchService + +KEY_RING=${key-ring} +KMS_KEY=${kms-key} + +GOOGLE_CLOUD_PROJECT=${google-cloud-project} +google-cloud-project=osdu-cicd-epam + +google-audiences=123.apps.googleusercontent.com +GOOGLE_AUDIENCES=${google-audiences} + +partition-admin-accounts=osdu-gcp-sa + +mongo-db-url=localhost:27017 +mongo-db-user= +mongo-db-password= + +PARTITION_API=http://localhost:8080/ \ No newline at end of file diff --git a/provider/partition-reference/src/main/resources/logback.xml b/provider/partition-reference/src/main/resources/logback.xml new file mode 100644 index 0000000000000000000000000000000000000000..2f7a4d029a3d0568b4b6fbaa5d2db8bf21b33381 --- /dev/null +++ b/provider/partition-reference/src/main/resources/logback.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration> + <include resource="org/springframework/boot/logging/logback/defaults.xml"/> + <logger name="org.opengroup.osdu" level="${LOG_LEVEL}"/> + <springProfile name="local"> + <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%yellow([%thread]) %highlight(| %-5level |) %green(%d) %cyan(| %logger{15} |) + %highlight(%msg) %n + </pattern> + <charset>utf8</charset> + </encoder> + </appender> + <root level="info"> + <appender-ref ref="CONSOLE"/> + </root> + </springProfile> + --> + + <springProfile name="!local"> + <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> + <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> + <layout class="ch.qos.logback.contrib.json.classic.JsonLayout"> + <timestampFormat>yyyy-MM-dd HH:mm:ss.SSS</timestampFormat> + <timestampFormatTimezoneId>Etc/UTC</timestampFormatTimezoneId> + <appendLineSeparator>true</appendLineSeparator> + + <jsonFormatter class="org.opengroup.osdu.core.gcp.logging.formatter.GoogleJsonFormatter"> + <prettyPrint>false</prettyPrint> + </jsonFormatter> + </layout> + </encoder> + </appender> + + <root level="info"> + <appender-ref ref="stdout"/> + </root> + </springProfile> + +</configuration> \ No newline at end of file diff --git a/provider/partition-reference/src/test/java/org/opengroup/osdu/partition/provider/reference/repository/PartitionPropertyEntityRepositoryTest.java b/provider/partition-reference/src/test/java/org/opengroup/osdu/partition/provider/reference/repository/PartitionPropertyEntityRepositoryTest.java new file mode 100644 index 0000000000000000000000000000000000000000..96415e7db89b4e4c56e9eee953be49f656a4522c --- /dev/null +++ b/provider/partition-reference/src/test/java/org/opengroup/osdu/partition/provider/reference/repository/PartitionPropertyEntityRepositoryTest.java @@ -0,0 +1,223 @@ +package org.opengroup.osdu.partition.provider.reference.repository; + +import static com.mongodb.client.model.Filters.eq; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.opengroup.osdu.partition.provider.reference.repository.PartitionPropertyEntityRepository.PARTITIONS; +import static org.opengroup.osdu.partition.provider.reference.repository.PartitionPropertyEntityRepository.PARTITIONS_DATABASE; +import static org.opengroup.osdu.partition.provider.reference.repository.PartitionPropertyEntityRepository.PARTITION_ID; +import static org.powermock.api.mockito.PowerMockito.mock; +import static org.powermock.api.mockito.PowerMockito.when; + +import com.mongodb.client.FindIterable; +import com.mongodb.client.MongoClient; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.result.DeleteResult; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import org.bson.Document; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.opengroup.osdu.partition.model.PartitionInfo; +import org.opengroup.osdu.partition.model.Property; +import org.opengroup.osdu.partition.provider.reference.config.MongoDBConfigProperties; +import org.opengroup.osdu.partition.provider.reference.persistence.MongoDdmsClient; +import org.powermock.core.classloader.annotations.PrepareForTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.data.mongodb.core.MongoOperations; + +@RunWith(MockitoJUnitRunner.class) +@PrepareForTest({MongoOperations.class, MongoClient.class}) +public class PartitionPropertyEntityRepositoryTest { + + private static final String PARTITION_ID_VALUE = "PartitionId"; + + @Mock + private MongoDdmsClient mongoDdmsClient; + + @MockBean + private MongoOperations ops; + + @MockBean + private MongoDBConfigProperties mongoDBConfigProperties; + + @InjectMocks + private PartitionPropertyEntityRepository repo; + + @Test + public void testCreatePartition() { + when(mongoDdmsClient.getMongoCollection(PARTITIONS_DATABASE, PARTITIONS)).thenReturn( + mock(MongoCollection.class)); + + PartitionInfo expectedResult = buildPartitionInfo(); + Optional<PartitionInfo> actualResult = repo.createPartition(PARTITION_ID_VALUE, expectedResult); + + assertEquals(expectedResult, actualResult.get()); + } + + @Test + public void testCreatePartitionWithNullPartitionId() { + PartitionInfo expectedResult = buildPartitionInfo(); + Optional<PartitionInfo> partition = repo.createPartition(null, expectedResult); + + assertFalse(partition.isPresent()); + } + + @Test + public void testUpdatePartition() { + MongoCollection<Document> mongoCollection = mock(MongoCollection.class); + Document result = mock(Document.class); + when(mongoDdmsClient.getMongoCollection(PARTITIONS_DATABASE, PARTITIONS)).thenReturn( + mongoCollection); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE))).thenReturn( + mock(FindIterable.class)); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE)).first()).thenReturn(result); + when(result.toJson()).thenReturn( + "{\"_id\": {\"$oid\": \"ID\"}, \"partitionId\": \"PartitionId\", \"properties\": {\"bucket\": {\"sensitive\": false, \"value\": \"osdu-cicd-epam-records\"}, \"crmAccountID\": {\"sensitive\": false, \"value\": \"[\\\"cicd\\\",\\\"opendes1234\\\"]\"}, \"policy-service-enabled\": {\"sensitive\": false, \"value\": \"false\"}, \"name\": {\"sensitive\": false, \"value\": \"opendes1234\"}, \"compliance-ruleset\": {\"sensitive\": false, \"value\": \"shared\"}, \"projectId\": {\"sensitive\": false, \"value\": \"osdu\"}}}"); + + PartitionInfo expectedResult = buildPartitionInfo(); + Optional<PartitionInfo> actualResult = repo.updatePartition(PARTITION_ID_VALUE, + expectedResult); + + assertEquals(expectedResult, actualResult.get()); + } + + @Test + public void testUpdatePartitionWithNullPartitionInfo() { + Optional<PartitionInfo> actualResult = repo.updatePartition(PARTITION_ID_VALUE, null); + + assertFalse(actualResult.isPresent()); + } + + @Test + public void testDeletePartition() { + MongoCollection<Document> mongoCollection = mock(MongoCollection.class); + DeleteResult deleteResult = mock(DeleteResult.class); + when(mongoDdmsClient.getMongoCollection(PARTITIONS_DATABASE, PARTITIONS)).thenReturn( + mongoCollection); + when(mongoCollection.deleteMany(eq(PARTITION_ID, PARTITION_ID_VALUE))).thenReturn(deleteResult); + when(deleteResult.wasAcknowledged()).thenReturn(true); + + boolean result = repo.isDeletedPartitionInfoByPartitionId(PARTITION_ID_VALUE); + + assertTrue(result); + } + + @Test + public void testDeletePartitionWithNullPartitionId() { + boolean result = repo.isDeletedPartitionInfoByPartitionId(null); + + assertFalse(result); + } + + @Test + public void testFindByPartitionId() { + MongoCollection<Document> mongoCollection = mock(MongoCollection.class); + Document result = mock(Document.class); + when(mongoDdmsClient.getMongoCollection(PARTITIONS_DATABASE, PARTITIONS)).thenReturn( + mongoCollection); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE))).thenReturn( + mock(FindIterable.class)); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE)).first()).thenReturn(result); + when(result.toJson()).thenReturn( + "{\"_id\": {\"$oid\": \"ID\"}, \"partitionId\": \"PartitionId\", \"properties\": {\"bucket\": {\"sensitive\": false, \"value\": \"osdu-cicd-epam-records\"}, \"crmAccountID\": {\"sensitive\": false, \"value\": \"[\\\"cicd\\\",\\\"opendes1234\\\"]\"}, \"policy-service-enabled\": {\"sensitive\": false, \"value\": \"false\"}, \"name\": {\"sensitive\": false, \"value\": \"opendes1234\"}, \"compliance-ruleset\": {\"sensitive\": false, \"value\": \"shared\"}, \"projectId\": {\"sensitive\": false, \"value\": \"osdu\"}}}"); + + Optional<PartitionInfo> actualResult = repo.findByPartitionId(PARTITION_ID_VALUE); + + assertNotNull(actualResult.get()); + } + + @Test + public void testFindByPartitionIdWithoutFoundDocument() { + MongoCollection<Document> mongoCollection = mock(MongoCollection.class); + when(mongoDdmsClient.getMongoCollection(PARTITIONS_DATABASE, PARTITIONS)).thenReturn( + mongoCollection); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE))).thenReturn( + mock(FindIterable.class)); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE)).first()).thenReturn(null); + + Optional<PartitionInfo> actualResult = repo.findByPartitionId(PARTITION_ID_VALUE); + + assertFalse(actualResult.isPresent()); + } + + @Test + public void testFindByPartitionIdWithNullPartitionId() { + Optional<PartitionInfo> actualResult = repo.findByPartitionId(null); + + assertFalse(actualResult.isPresent()); + } + + @Test + public void testFindByPartitionIdAndName() { + MongoCollection<Document> mongoCollection = mock(MongoCollection.class); + Document result = mock(Document.class); + when(mongoDdmsClient.getMongoCollection(PARTITIONS_DATABASE, PARTITIONS)).thenReturn( + mongoCollection); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE))).thenReturn( + mock(FindIterable.class)); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE)).first()).thenReturn(result); + when(result.toJson()).thenReturn( + "{\"_id\": {\"$oid\": \"ID\"}, \"partitionId\": \"PartitionId\", \"properties\": {\"bucket\": {\"sensitive\": false, \"value\": \"osdu-cicd-epam-records\"}, \"crmAccountID\": {\"sensitive\": false, \"value\": \"[\\\"cicd\\\",\\\"opendes1234\\\"]\"}, \"policy-service-enabled\": {\"sensitive\": false, \"value\": \"false\"}, \"name\": {\"sensitive\": false, \"value\": \"opendes1234\"}, \"compliance-ruleset\": {\"sensitive\": false, \"value\": \"shared\"}, \"projectId\": {\"sensitive\": false, \"value\": \"osdu\"}}}"); + + Optional<Property> actualResult = repo.findByPartitionIdAndName(PARTITION_ID_VALUE, "bucket"); + + assertNotNull(actualResult.get()); + + } + + @Test + public void testFindByPartitionIdAndNameWithNullPartitionId() { + Optional<Property> actualResult = repo.findByPartitionIdAndName(null, "bucket"); + assertFalse(actualResult.isPresent()); + } + + @Test + public void testFindByPartitionIdAndNameWithoutFoundDocument() { + MongoCollection<Document> mongoCollection = mock(MongoCollection.class); + when(mongoDdmsClient.getMongoCollection(PARTITIONS_DATABASE, PARTITIONS)).thenReturn( + mongoCollection); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE))).thenReturn( + mock(FindIterable.class)); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE)).first()).thenReturn(null); + + Optional<Property> actualResult = repo.findByPartitionIdAndName(PARTITION_ID_VALUE, "nonExist"); + + assertFalse(actualResult.isPresent()); + } + + @Test + public void testFindByPartitionIdAndNameWithoutFoundProperty() { + MongoCollection<Document> mongoCollection = mock(MongoCollection.class); + Document result = mock(Document.class); + when(mongoDdmsClient.getMongoCollection(PARTITIONS_DATABASE, PARTITIONS)).thenReturn( + mongoCollection); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE))).thenReturn( + mock(FindIterable.class)); + when(mongoCollection.find(eq(PARTITION_ID, PARTITION_ID_VALUE)).first()).thenReturn(result); + when(result.toJson()).thenReturn( + "{\"_id\": {\"$oid\": \"ID\"}, \"partitionId\": \"PartitionId\", \"properties\": {\"bucket\": {\"sensitive\": false, \"value\": \"osdu-cicd-epam-records\"}, \"crmAccountID\": {\"sensitive\": false, \"value\": \"[\\\"cicd\\\",\\\"opendes1234\\\"]\"}, \"policy-service-enabled\": {\"sensitive\": false, \"value\": \"false\"}, \"name\": {\"sensitive\": false, \"value\": \"opendes1234\"}, \"compliance-ruleset\": {\"sensitive\": false, \"value\": \"shared\"}, \"projectId\": {\"sensitive\": false, \"value\": \"osdu\"}}}"); + + Optional<Property> actualResult = repo.findByPartitionIdAndName(PARTITION_ID_VALUE, "nonExist"); + + assertFalse(actualResult.isPresent()); + } + + + private PartitionInfo buildPartitionInfo() { + PartitionInfo partitionInfo = new PartitionInfo(); + Map<String, Property> properties = new HashMap<>(); + properties.put("compliance-ruleset", new Property(true, "value")); + properties.put("dataPartitionId", new Property(false, "PartitionId")); + partitionInfo.setProperties(properties); + + return partitionInfo; + } +} diff --git a/testing/partition-test-aws/pom.xml b/testing/partition-test-aws/pom.xml index dbf4216496b43ca9b430ae830de2b753ae5a4452..68b25e225a413a2001b56514496926d5cc630ece 100644 --- a/testing/partition-test-aws/pom.xml +++ b/testing/partition-test-aws/pom.xml @@ -19,14 +19,14 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-partition-testing</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu.partition</groupId> <artifactId>partition-test-aws</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -65,7 +65,7 @@ <dependency> <groupId>org.opengroup.osdu.partition</groupId> <artifactId>partition-test-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/testing/partition-test-azure/pom.xml b/testing/partition-test-azure/pom.xml index e8924dbd8bc6188bed71bc7376501ab56d809a7d..152cc6b1228f5fc9c774b8645d47e5e1b3dcce80 100644 --- a/testing/partition-test-azure/pom.xml +++ b/testing/partition-test-azure/pom.xml @@ -20,13 +20,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-partition-testing</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.partition</groupId> <artifactId>partition-test-azure</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -65,7 +65,7 @@ <dependency> <groupId>org.opengroup.osdu.partition</groupId> <artifactId>partition-test-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/testing/partition-test-core/pom.xml b/testing/partition-test-core/pom.xml index e0a4aa236524e797c4345de4cf0c55800224ab78..b0c09482e75269445a9dbd649a3db6a3819af4b4 100644 --- a/testing/partition-test-core/pom.xml +++ b/testing/partition-test-core/pom.xml @@ -20,13 +20,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-partition-testing</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.partition</groupId> <artifactId>partition-test-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> diff --git a/testing/partition-test-gcp/pom.xml b/testing/partition-test-gcp/pom.xml index a0111c8f524326f6357d9c3937e66236e268e894..1efc78b25db67fcbeedc4719c9df8c01c2ea28d2 100644 --- a/testing/partition-test-gcp/pom.xml +++ b/testing/partition-test-gcp/pom.xml @@ -6,13 +6,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-partition-testing</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.partition</groupId> <artifactId>partition-test-gcp</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -57,7 +57,7 @@ <dependency> <groupId>org.opengroup.osdu.partition</groupId> <artifactId>partition-test-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/testing/partition-test-ibm/pom.xml b/testing/partition-test-ibm/pom.xml index 70ea3a03beaea06a96563cc3efeb8a3a82cf250c..9dfbabffe7f752c22d901a341b823a0b28f67efe 100644 --- a/testing/partition-test-ibm/pom.xml +++ b/testing/partition-test-ibm/pom.xml @@ -6,13 +6,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-partition-testing</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.partition</groupId> <artifactId>partition-test-ibm</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -58,7 +58,7 @@ <dependency> <groupId>org.opengroup.osdu.partition</groupId> <artifactId>partition-test-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestCreatePartition.java b/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestCreatePartition.java index 2f4789ae1e05648cdd510f6b5adf57e0fdf62b0c..38292e7425ba84e9d228a990449b4226627f9a88 100644 --- a/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestCreatePartition.java +++ b/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestCreatePartition.java @@ -3,15 +3,10 @@ package org.opengroup.osdu.partition.api; -import static org.junit.Assert.assertEquals; - import org.junit.After; import org.junit.Before; -import org.junit.Test; import org.opengroup.osdu.partition.util.IBMTestUtils; -import com.sun.jersey.api.client.ClientResponse; - public class TestCreatePartition extends CreatePartitionTest { @Before @@ -25,23 +20,6 @@ public class TestCreatePartition extends CreatePartitionTest { public void tearDown() { this.testUtils = null; } - - @Test - @Override - public void should_return401_when_noAccessToken() throws Exception { - // Springboot Keycloak gives 403 when token does not have required roles - ClientResponse response = descriptor.runOnCustomerTenant(getId(), testUtils.getNoAccessToken()); - assertEquals(error(response.getEntity(String.class)), 403, response.getStatus()); - } - - @Test - @Override - public void should_return401_when_accessingWithCredentialsWithoutPermission() throws Exception { - // Partition-ibm service does not required partition id - // Here, no access token used hence checking with 403 response code in assertion statement - ClientResponse response = descriptor.run(getId(), testUtils.getNoAccessToken()); - assertEquals(403, response.getStatus()); - } - + } diff --git a/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestDeletePartition.java b/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestDeletePartition.java index 49101f0d3f512be5d095b9f1377a44e843643b74..3edcc15fda767afe3868569aac23cc1f56655471 100644 --- a/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestDeletePartition.java +++ b/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestDeletePartition.java @@ -3,15 +3,10 @@ package org.opengroup.osdu.partition.api; -import static org.junit.Assert.assertEquals; - import org.junit.After; import org.junit.Before; -import org.junit.Test; import org.opengroup.osdu.partition.util.IBMTestUtils; -import com.sun.jersey.api.client.ClientResponse; - public class TestDeletePartition extends DeletePartitionTest { @Before @@ -26,20 +21,4 @@ public class TestDeletePartition extends DeletePartitionTest { this.testUtils = null; } - @Test - @Override - public void should_return401_when_noAccessToken() throws Exception { - // Springboot Keycloak gives 403 when token does not have required roles - ClientResponse response = descriptor.runOnCustomerTenant(getId(), testUtils.getNoAccessToken()); - assertEquals(error(response.getEntity(String.class)), 403, response.getStatus()); - } - - @Test - @Override - public void should_return401_when_accessingWithCredentialsWithoutPermission() throws Exception { - // Partition-ibm service does not required partition id - // Here, no access token used hence checking with 403 response code in assertion statement - ClientResponse response = descriptor.run(getId(), testUtils.getNoAccessToken()); - assertEquals(403, response.getStatus()); - } } diff --git a/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestGetPartitionById.java b/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestGetPartitionById.java index fb77068ad6b986d5044c054ede5330545ca3f0d4..dd9247dcf7e06cae89911fee0cfea91660fea2e7 100644 --- a/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestGetPartitionById.java +++ b/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestGetPartitionById.java @@ -25,20 +25,5 @@ public class TestGetPartitionById extends GetPartitionByIdApitTest { public void tearDown() { this.testUtils = null; } - @Test - @Override - public void should_return401_when_noAccessToken() throws Exception { - // Springboot Keycloak gives 403 when token does not have required roles - ClientResponse response = descriptor.runOnCustomerTenant(getId(), testUtils.getNoAccessToken()); - assertEquals(error(response.getEntity(String.class)), 403, response.getStatus()); - } - - @Test - @Override - public void should_return401_when_accessingWithCredentialsWithoutPermission() throws Exception { - // Partition-ibm service does not required partition id - // Here, no access token used hence checking with 403 response code in assertion statement - ClientResponse response = descriptor.run(getId(), testUtils.getNoAccessToken()); - assertEquals(403, response.getStatus()); - } + } diff --git a/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestListPartitions.java b/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestListPartitions.java index c9993b15a9af28db9fc9e8e0c05cf1a7ea7137b1..7f325d538abefa7ab4ad3286306a2ab265f11d8b 100644 --- a/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestListPartitions.java +++ b/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestListPartitions.java @@ -3,15 +3,10 @@ package org.opengroup.osdu.partition.api; -import static org.junit.Assert.assertEquals; - import org.junit.After; import org.junit.Before; -import org.junit.Test; import org.opengroup.osdu.partition.util.IBMTestUtils; -import com.sun.jersey.api.client.ClientResponse; - public class TestListPartitions extends ListPartitionsApitTest { @Before @@ -25,20 +20,5 @@ public class TestListPartitions extends ListPartitionsApitTest { public void tearDown() { this.testUtils = null; } - @Test - @Override - public void should_return401_when_noAccessToken() throws Exception { - // Springboot Keycloak gives 403 when token does not have required roles - ClientResponse response = descriptor.runOnCustomerTenant(getId(), testUtils.getNoAccessToken()); - assertEquals(error(response.getEntity(String.class)), 403, response.getStatus()); - } - @Test - @Override - public void should_return401_when_accessingWithCredentialsWithoutPermission() throws Exception { - // Partition-ibm service does not required partition id - // Here, no access token used hence checking with 403 response code in assertion statement - ClientResponse response = descriptor.run(getId(), testUtils.getNoAccessToken()); - assertEquals(403, response.getStatus()); - } } diff --git a/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestUpdatePartition.java b/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestUpdatePartition.java index 666865625ac28505b2e156b31691c87492ab6368..62bc2289bea5153a55384479787c005859ff90b6 100644 --- a/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestUpdatePartition.java +++ b/testing/partition-test-ibm/src/test/java/org/opengroup/osdu/partition/api/TestUpdatePartition.java @@ -25,20 +25,5 @@ public class TestUpdatePartition extends UpdatePartitionTest { public void tearDown() { this.testUtils = null; } - @Test - @Override - public void should_return401_when_noAccessToken() throws Exception { - // Springboot Keycloak gives 403 when token does not have required roles - ClientResponse response = descriptor.runOnCustomerTenant(getId(), testUtils.getNoAccessToken()); - assertEquals(error(response.getEntity(String.class)), 403, response.getStatus()); - } - - @Test - @Override - public void should_return401_when_accessingWithCredentialsWithoutPermission() throws Exception { - // Partition-ibm service does not required partition id - // Here, no access token used hence checking with 403 response code in assertion statement - ClientResponse response = descriptor.run(getId(), testUtils.getNoAccessToken()); - assertEquals(403, response.getStatus()); - } + } diff --git a/testing/pom.xml b/testing/pom.xml index 6d504655c04fc2e2dad88f3ca0055e97d29055b6..665c337607d068bf18d73aae077ef0ff592b381e 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -18,7 +18,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu</groupId> <artifactId>os-partition-testing</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <description>Root partition test project</description> <packaging>pom</packaging>