Commit c057eb17 authored by harshit aggarwal's avatar harshit aggarwal
Browse files

Merge branch 'abpatil/token_generation' into 'master'

Using AzureServicePrincipleTokenService in implementation of UserCredential

See merge request !90
parents a4574ae1 48930036
Pipeline #61738 passed with stages
in 35 minutes and 29 seconds
......@@ -14,8 +14,6 @@ Apache-2.0
========================================================================
The following software have components provided under the terms of this license:
- ASM Core (from https://repo1.maven.org/maven2/org/ow2/asm/asm)
- ASM Core (from https://repo1.maven.org/maven2/org/ow2/asm/asm)
- ASM based accessors helper used by json-smart (from )
- ASM based accessors helper used by json-smart (from )
- Adapter: RxJava (from https://repo1.maven.org/maven2/com/squareup/retrofit2/adapter-rxjava)
......@@ -25,8 +23,7 @@ The following software have components provided under the terms of this license:
- Apache Commons Lang (from http://commons.apache.org/proper/commons-lang/)
- Apache Commons Logging (from http://commons.apache.org/proper/commons-logging/)
- Apache HttpAsyncClient (from http://hc.apache.org/httpcomponents-asyncclient)
- Apache HttpClient (from http://hc.apache.org/httpcomponents-client)
- Apache HttpClient Cache (from http://hc.apache.org/httpcomponents-client)
- Apache HttpCore NIO (from http://hc.apache.org/httpcomponents-core-ga)
- Apache Log4j API (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api)
- Apache Log4j Core (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core)
- Apache Log4j JUL Adapter (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul)
......@@ -40,7 +37,6 @@ The following software have components provided under the terms of this license:
- Awaitility (from http://awaitility.org)
- Awaitility (from http://awaitility.org)
- Bean Validation API (from http://beanvalidation.org)
- Bean Validation API (from http://beanvalidation.org)
- Brave (from https://repo1.maven.org/maven2/io/zipkin/brave/brave)
- Brave Instrumentation: Http Adapters (from https://repo1.maven.org/maven2/io/zipkin/brave/brave-instrumentation-http)
- Brave instrumentation for Reactor Netty HTTP (from https://github.com/reactor/reactor-netty)
......@@ -54,7 +50,6 @@ The following software have components provided under the terms of this license:
- DataTree Core API (from https://berkesa.github.io/datatree/)
- Elastic JNA Distribution (from https://github.com/java-native-access/jna)
- Elastic JNA Distribution (from https://github.com/java-native-access/jna)
- Expression Language 3.0 (from https://projects.eclipse.org/projects/ee4j.el)
- FindBugs-jsr305 (from http://findbugs.sourceforge.net/)
- GSON extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-gson)
- Google APIs Client Library for Java (from https://repo1.maven.org/maven2/com/google/api-client/google-api-client)
......@@ -66,7 +61,7 @@ The following software have components provided under the terms of this license:
- Google Cloud IAM Service Account Credentials (from https://github.com/googleapis/java-iamcredentials)
- 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/google-cloud-java/tree/master/google-cloud-clients/google-cloud-pubsub)
- Google Cloud Pub/Sub (from https://github.com/googleapis/java-pubsub)
- Google Cloud Storage (from https://github.com/googleapis/java-storage)
- Google Guice - Core Library (from https://repo1.maven.org/maven2/com/google/inject/guice)
- Google Guice - Core Library (from https://repo1.maven.org/maven2/com/google/inject/guice)
......@@ -78,32 +73,35 @@ The following software have components provided under the terms of this license:
- HPPC Collections (from https://repo1.maven.org/maven2/com/carrotsearch/hppc)
- HTTP functionality for the Reactor Netty library (from https://github.com/reactor/reactor-netty)
- Hibernate Validator Engine (from https://repo1.maven.org/maven2/org/hibernate/validator/hibernate-validator)
- HttpCore (NIO extensions module) (from http://hc.apache.org/httpcomponents-core/)
- HttpCore (base module) (from http://hc.apache.org/httpcomponents-core/)
- 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/)
- Identity and Access Management (IAM) API v1-rev20210226-1.31.0 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-iam)
- J2ObjC Annotations (from https://github.com/google/j2objc/)
- JBoss Logging 3 (from http://www.jboss.org)
- JCIP Annotations under Apache License (from http://stephenc.github.com/jcip-annotations)
- 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://github.com/jwtk/jjwt)
- JSON Web Token support for the JVM (from https://repo1.maven.org/maven2/io/jsonwebtoken/jjwt)
- JSON library from Android SDK (from http://developer.android.com/sdk)
- JSONassert (from https://github.com/skyscreamer/JSONassert)
- JSR107 API and SPI (from https://github.com/jsr107/jsr107spec)
- 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 dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary)
- Jackson dataformat: Smile (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: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310)
- 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 module: JAXB Annotations (from https://github.com/FasterXML/jackson-modules-base)
- 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-core (from https://github.com/FasterXML/jackson-core)
- Jackson-dataformat-Smile (from http://wiki.fasterxml.com/JacksonForSmile)
- Jackson-dataformat-XML (from https://github.com/FasterXML/jackson-dataformat-xml)
- Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson-dataformats-text)
- Jackson-datatype-Joda (from http://wiki.fasterxml.com/JacksonModuleJoda)
- Jackson-module-Afterburner (from http://wiki.fasterxml.com/JacksonHome)
- 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 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)
......@@ -118,7 +116,7 @@ The following software have components provided under the terms of this license:
- 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)
- Logback Contrib :: JSON :: Core (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-json-core)
- Logback Contrib :: Jackson (from )
- Logback Contrib :: Jackson (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-jackson)
- Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common)
- Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common)
- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core)
......@@ -130,9 +128,9 @@ The following software have components provided under the terms of this license:
- Lucene Join (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-join)
- Lucene Join (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-join)
- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs)
- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory)
- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs)
- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory)
- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory)
- Lucene Miscellaneous (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-misc)
- Lucene Miscellaneous (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-misc)
- Lucene Queries (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-queries)
......@@ -189,13 +187,16 @@ The following software have components provided under the terms of this license:
- PWDB :: Database (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/database)
- 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)
- Reactor Netty with all modules (from https://github.com/reactor/reactor-netty)
- Reactive Streams Netty driver (from https://github.com/reactor/reactor-netty)
- Retrofit (from https://github.com/square/retrofit)
- SnakeYAML (from http://www.snakeyaml.org)
- Spring AOP (from https://github.com/spring-projects/spring-framework)
- Spring AOP (from https://github.com/spring-projects/spring-framework)
- Spring Beans (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 Tomcat Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-tomcat)
- Spring Commons Logging Bridge (from https://github.com/spring-projects/spring-framework)
- Spring Commons Logging Bridge (from https://github.com/spring-projects/spring-framework)
- Spring Context (from https://github.com/spring-projects/spring-framework)
......@@ -225,19 +226,17 @@ The following software have components provided under the terms of this license:
- aalto-xml (from )
- aggs-matrix-stats (from https://github.com/elastic/elasticsearch)
- aggs-matrix-stats (from https://github.com/elastic/elasticsearch)
- asm (from http://asm.ow2.io/)
- asm (from http://asm.ow2.io/)
- cli (from https://github.com/elastic/elasticsearch)
- cli (from https://github.com/elastic/elasticsearch)
- com.google.api.grpc:proto-google-cloud-datastore-v1 (from https://github.com/googleapis/googleapis)
- compiler (from http://github.com/spullara/mustache.java)
- core (from https://github.com/elastic/elasticsearch)
- core (from https://github.com/elastic/elasticsearch)
- datastore-v1-proto-client (from https://repo1.maven.org/maven2/com/google/cloud/datastore/datastore-v1-proto-client)
- elasticsearch-cli (from https://github.com/elastic/elasticsearch)
- elasticsearch-cli (from https://github.com/elastic/elasticsearch)
- elasticsearch-core (from https://github.com/elastic/elasticsearch)
- elasticsearch-core (from https://github.com/elastic/elasticsearch)
- elasticsearch-geo (from https://github.com/elastic/elasticsearch)
- elasticsearch-geo (from https://github.com/elastic/elasticsearch)
- elasticsearch-secure-sm (from https://github.com/elastic/elasticsearch)
- elasticsearch-secure-sm (from https://github.com/elastic/elasticsearch)
- elasticsearch-x-content (from https://github.com/elastic/elasticsearch)
- elasticsearch-x-content (from https://github.com/elastic/elasticsearch)
- error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations)
- 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)
......@@ -279,24 +278,26 @@ The following software have components provided under the terms of this license:
- project ':json-path' (from https://github.com/jayway/JsonPath)
- proto-google-cloud-iamcredentials-v1 (from https://github.com/googleapis/java-iamcredentials/proto-google-cloud-iamcredentials-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://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-pubsub-v1)
- proto-google-common-protos (from https://github.com/googleapis/java-iam/proto-google-common-protos)
- 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-iam-v1 (from https://github.com/googleapis/java-iam/proto-google-iam-v1)
- rank-eval (from https://github.com/elastic/elasticsearch)
- rank-eval (from https://github.com/elastic/elasticsearch)
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://github.com/resilience4j/resilience4j)
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://github.com/resilience4j/resilience4j)
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://github.com/resilience4j/resilience4j)
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://github.com/resilience4j/resilience4j)
- rest (from https://github.com/elastic/elasticsearch)
- rest (from https://github.com/elastic/elasticsearch)
- rest-high-level (from https://github.com/elastic/elasticsearch)
- rest-high-level (from https://github.com/elastic/elasticsearch)
- rxjava (from https://github.com/ReactiveX/RxJava)
- secure-sm (from https://github.com/elastic/elasticsearch)
- secure-sm (from https://github.com/elastic/elasticsearch)
- server (from https://github.com/elastic/elasticsearch)
- server (from https://github.com/elastic/elasticsearch)
- spring-boot (from https://spring.io/projects/spring-boot)
......@@ -316,14 +317,11 @@ The following software have components provided under the terms of this license:
- spring-boot-starter-aop (from https://spring.io/projects/spring-boot)
- spring-boot-starter-json (from https://spring.io/projects/spring-boot)
- spring-boot-starter-json (from https://spring.io/projects/spring-boot)
- spring-boot-starter-log4j2 (from https://spring.io/projects/spring-boot)
- spring-boot-starter-logging (from https://spring.io/projects/spring-boot)
- spring-boot-starter-security (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-test (from https://spring.io/projects/spring-boot)
- spring-boot-starter-tomcat (from https://spring.io/projects/spring-boot)
- spring-boot-starter-tomcat (from https://spring.io/projects/spring-boot)
- spring-boot-starter-validation (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)
......@@ -342,6 +340,8 @@ The following software have components provided under the terms of this license:
- swagger-jaxrs (from )
- tomcat-embed-core (from http://tomcat.apache.org/)
- tomcat-embed-websocket (from https://tomcat.apache.org/)
- x-content (from https://github.com/elastic/elasticsearch)
- x-content (from https://github.com/elastic/elasticsearch)
========================================================================
BSD-2-Clause
......@@ -370,8 +370,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 Core (from https://repo1.maven.org/maven2/org/ow2/asm/asm)
- ASM Core (from https://repo1.maven.org/maven2/org/ow2/asm/asm)
- 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)
......@@ -383,7 +381,7 @@ The following software have components provided under the terms of this license:
- Hamcrest Core (from http://hamcrest.org/)
- Hamcrest library (from )
- HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/)
- Jakarta Activation API (from https://github.com/eclipse-ee4j/jaf)
- 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)
- Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common)
- Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common)
......@@ -404,6 +402,8 @@ The following software have components provided under the terms of this license:
- Spring Core (from https://github.com/spring-projects/spring-framework)
- 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/)
========================================================================
CC-BY-2.5
......@@ -463,7 +463,6 @@ EPL-1.0
The following software have components provided under the terms of this license:
- AspectJ Weaver (from https://www.eclipse.org/aspectj/)
- Expression Language 3.0 (from https://projects.eclipse.org/projects/ee4j.el)
- JUnit Jupiter (Aggregator) (from https://junit.org/junit5/)
- JUnit Jupiter (Aggregator) (from https://junit.org/junit5/)
- JUnit Jupiter API (from https://junit.org/junit5/)
......@@ -477,9 +476,11 @@ The following software have components provided under the terms of this license:
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Vintage Engine (from https://junit.org/junit5/)
- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca)
- Jakarta Expression Language Implementation (from https://projects.eclipse.org/projects/ee4j.el)
- Logback Classic Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-classic)
- Logback Contrib :: JSON :: Core (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-json-core)
- Logback Contrib :: Jackson (from )
- Logback Contrib :: Jackson (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-jackson)
- Logback Core Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-core)
- Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java)
- Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java)
......@@ -487,14 +488,12 @@ The following software have components provided under the terms of this license:
- Microsoft Application Insights Java SDK Web with Auto Registration Module (from https://github.com/Microsoft/ApplicationInsights-Java)
- Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java)
- SnakeYAML (from http://www.snakeyaml.org)
- jakarta.annotation-api (from https://projects.eclipse.org/projects/ee4j.ca)
========================================================================
EPL-2.0
========================================================================
The following software have components provided under the terms of this license:
- Expression Language 3.0 (from https://projects.eclipse.org/projects/ee4j.el)
- JUnit Jupiter (Aggregator) (from https://junit.org/junit5/)
- JUnit Jupiter (Aggregator) (from https://junit.org/junit5/)
- JUnit Jupiter API (from https://junit.org/junit5/)
......@@ -508,7 +507,8 @@ The following software have components provided under the terms of this license:
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Vintage Engine (from https://junit.org/junit5/)
- jakarta.annotation-api (from https://projects.eclipse.org/projects/ee4j.ca)
- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca)
- Jakarta Expression Language Implementation (from https://projects.eclipse.org/projects/ee4j.el)
========================================================================
GPL-2.0-only
......@@ -532,9 +532,9 @@ GPL-2.0-with-classpath-exception
The following software have components provided under the terms of this license:
- Checker Qual (from https://checkerframework.org)
- Expression Language 3.0 (from https://projects.eclipse.org/projects/ee4j.el)
- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca)
- Jakarta Expression Language Implementation (from https://projects.eclipse.org/projects/ee4j.el)
- JavaBeans Activation Framework (from )
- jakarta.annotation-api (from https://projects.eclipse.org/projects/ee4j.ca)
- javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250)
- tomcat-embed-core (from http://tomcat.apache.org/)
......@@ -543,10 +543,10 @@ GPL-3.0-only
========================================================================
The following software have components provided under the terms of this license:
- Expression Language 3.0 (from https://projects.eclipse.org/projects/ee4j.el)
- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca)
- Jakarta Expression Language Implementation (from https://projects.eclipse.org/projects/ee4j.el)
- Project Lombok (from https://projectlombok.org)
- Project Lombok (from https://projectlombok.org)
- jakarta.annotation-api (from https://projects.eclipse.org/projects/ee4j.ca)
========================================================================
ImageMagick
......@@ -575,7 +575,7 @@ The following software have components provided under the terms of this license:
- Javassist (from http://www.javassist.org/)
- Logback Classic Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-classic)
- Logback Contrib :: JSON :: Core (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-json-core)
- Logback Contrib :: Jackson (from )
- Logback Contrib :: Jackson (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-jackson)
- Logback Core Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-core)
- Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java)
- Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java)
......@@ -697,7 +697,7 @@ PHP-3.01
========================================================================
The following software have components provided under the terms of this license:
- Jakarta Activation API (from https://github.com/eclipse-ee4j/jaf)
- 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)
========================================================================
......@@ -783,7 +783,7 @@ The following software have components provided under the terms of this license:
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Vintage Engine (from https://junit.org/junit5/)
- Jakarta Activation API (from https://github.com/eclipse-ee4j/jaf)
- 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/)
......
......@@ -12,7 +12,7 @@
<description>WKS service on Azure</description>
<packaging>jar</packaging>
<properties>
<osdu.corelibazure.version>0.11.0-rc4</osdu.corelibazure.version>
<osdu.corelibazure.version>0.11.0-rc5</osdu.corelibazure.version>
<azure.applicationinsights.version>2.6.1</azure.applicationinsights.version>
<osdu.os-wks-core.version>0.11.0-SNAPSHOT</osdu.os-wks-core.version>
<azure.version>2.1.7</azure.version>
......
package org.opengroup.osdu.wks.provider.azure.credentials;
import org.opengroup.osdu.azure.util.AzureServicePrincipal;
import org.opengroup.osdu.azure.util.AzureServicePrincipleTokenService;
import org.opengroup.osdu.core.common.model.tenant.TenantInfo;
import org.opengroup.osdu.wks.exceptions.ApplicationException;
import org.opengroup.osdu.wks.provider.azure.di.AzureBootstrapConfig;
import org.opengroup.osdu.wks.provider.interfaces.UserCredential;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import java.io.UnsupportedEncodingException;
@Configuration
public class JwtTokenGenerator implements UserCredential {
private final static Logger LOGGER = LoggerFactory.getLogger(JwtTokenGenerator.class);
private static final String BEARER = "Bearer ";
@Autowired
private AzureBootstrapConfig azureBootstrapConfig;
@Autowired
private AzureServicePrincipal azureServicePrincipal;
private AzureServicePrincipleTokenService tokenService;
@Override
public String getIdToken(TenantInfo tenant) throws ApplicationException {
// Azure service principal will have access to all data partitions
String token = null;
try {
token = BEARER + azureServicePrincipal.getIdToken(
azureBootstrapConfig.getClientId(),
azureBootstrapConfig.getClientSecret(),
azureBootstrapConfig.getTenantId(),
azureBootstrapConfig.getAppResourceId());
}
catch (UnsupportedEncodingException e) {
LOGGER.warn(e.getMessage(), e);
throw new ApplicationException(e.getMessage(), e.getCause());
}
return token;
public String getIdToken(TenantInfo tenantInfo){
return "Bearer " + this.tokenService.getAuthorizationToken();
}
}
package org.opengroup.osdu.wks.provider.azure.credentials;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.opengroup.osdu.azure.util.AzureServicePrincipal;
import org.opengroup.osdu.azure.util.AzureServicePrincipleTokenService;
import org.opengroup.osdu.core.common.model.http.AppException;
import org.opengroup.osdu.core.common.model.tenant.TenantInfo;
import org.opengroup.osdu.wks.exceptions.ApplicationException;
import org.opengroup.osdu.wks.provider.azure.di.AzureBootstrapConfig;
import java.io.UnsupportedEncodingException;
......@@ -25,58 +24,34 @@ import static org.mockito.Mockito.when;
public class JwtTokenGeneratorTest {
private static final String token = "jwt-token";
private static final String clientId = "client-id";
private static final String clientSecret = "client-secret";
private static final String tenantID = "tenant-id";
private static final String appResourceId = "app-resource-id";
@InjectMocks
private JwtTokenGenerator jwtTokenGenerator;
@Mock
private AzureServicePrincipal azureServicePrincipal;
@Mock
private AzureBootstrapConfig azureBootstrapConfig;
@BeforeEach
public void init() {
when(azureBootstrapConfig.getClientId()).thenReturn(clientId);
when(azureBootstrapConfig.getClientSecret()).thenReturn(clientSecret);
when(azureBootstrapConfig.getTenantId()).thenReturn(tenantID);
when(azureBootstrapConfig.getAppResourceId()).thenReturn(appResourceId);
}
private AzureServicePrincipleTokenService azureServicePrincipleTokenService;
@Test
public void shouldSuccessfullyGenerateToken() throws UnsupportedEncodingException, ApplicationException {
when(azureServicePrincipal.getIdToken(clientId, clientSecret, tenantID, appResourceId)).thenReturn(token);
when(azureServicePrincipleTokenService.getAuthorizationToken()).thenReturn(token);
String result = jwtTokenGenerator.getIdToken(new TenantInfo());
assertEquals("Bearer " + token, result);
verify(azureServicePrincipal, times(1)).getIdToken(clientId, clientSecret, tenantID, appResourceId);
verify(azureBootstrapConfig, times(1)).getClientId();
verify(azureBootstrapConfig, times(1)).getClientSecret();
verify(azureBootstrapConfig, times(1)).getTenantId();
verify(azureBootstrapConfig, times(1)).getAppResourceId();
verify(azureServicePrincipleTokenService, times(1)).getAuthorizationToken();
}
@Test
public void shouldThrowApplicationException() throws UnsupportedEncodingException {
public void shouldThrowAppException() throws UnsupportedEncodingException {
doThrow(UnsupportedEncodingException.class).when(azureServicePrincipal).getIdToken(clientId, clientSecret, tenantID, appResourceId);
doThrow(AppException.class).when(azureServicePrincipleTokenService).getAuthorizationToken();
ApplicationException exception = assertThrows(ApplicationException.class, () -> {
AppException exception = assertThrows(AppException.class, () -> {
jwtTokenGenerator.getIdToken(new TenantInfo());
});
assertNotNull(exception);
verify(azureServicePrincipal, times(1)).getIdToken(clientId, clientSecret, tenantID, appResourceId);
verify(azureBootstrapConfig, times(1)).getClientId();
verify(azureBootstrapConfig, times(1)).getClientSecret();
verify(azureBootstrapConfig, times(1)).getTenantId();
verify(azureBootstrapConfig, times(1)).getAppResourceId();
verify(azureServicePrincipleTokenService, times(1)).getAuthorizationToken();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment