diff --git a/.github/workflows/bld_all_docker.yml b/.github/workflows/bld_all_docker.yml new file mode 100644 index 0000000000..3dd354d64c --- /dev/null +++ b/.github/workflows/bld_all_docker.yml @@ -0,0 +1,89 @@ +name: bld_all_docker + +permissions: + checks: write + contents: read + issues: read + pull-requests: write + +on: + workflow_call: + inputs: + version_tag: + description: 'Version tag to use: (bump must also be set to none to keep a specific version' + required: false + default: 'latest' + type: string + bump: + description: 'whether to bump the version number by a major minor patch' + required: false + default: 'patch' + type: string + ref: + description: 'git reference to use with the checkout use default_branch to have that calculated' + required: false + default: "default" + type: string + + workflow_dispatch: + inputs: + version_tag: + description: 'Version tag to use: (bump must also be set to none to keep a specific version' + required: false + default: 'latest' + type: string + bump: + description: 'whether to bump the version number by a major minor patch' + required: false + default: 'patch' + type: string + ref: + description: 'git reference to use with the checkout use default_branch to have that calculated' + required: false + default: "default" + type: string + +jobs: + + bld_angular_prod: + uses: ./.github/workflows/bld_docker.yml + secrets: inherit # pass all secrets + with: + docker_name: orcid/registry/orcid-web-frontend-prod + context: . + version_tag: ${{ inputs.version_tag }} + bump: ${{ inputs.bump }} + build_args: "build_env=prod" + file: Dockerfile.build + bld_angular_sandbox: + uses: ./.github/workflows/bld_docker.yml + secrets: inherit # pass all secrets + with: + docker_name: orcid/registry/orcid-web-frontend-sandbox + context: . + version_tag: ${{ inputs.version_tag }} + bump: ${{ inputs.bump }} + build_args: "build_env=sandbox" + file: Dockerfile.build + bld_angular_qa: + uses: ./.github/workflows/bld_docker.yml + secrets: inherit # pass all secrets + with: + docker_name: orcid/registry/orcid-web-frontend-qa + context: . + version_tag: ${{ inputs.version_tag }} + bump: ${{ inputs.bump }} + build_args: "build_env=qa" + file: Dockerfile.build + bld_angular_int: + uses: ./.github/workflows/bld_docker.yml + secrets: inherit # pass all secrets + with: + docker_name: orcid/registry/orcid-web-frontend-int + context: . + version_tag: ${{ inputs.version_tag }} + bump: ${{ inputs.bump }} + build_args: "build_env=int" + file: Dockerfile.build + + diff --git a/.github/workflows/bld_docker.yml b/.github/workflows/bld_docker.yml new file mode 100644 index 0000000000..8402339f60 --- /dev/null +++ b/.github/workflows/bld_docker.yml @@ -0,0 +1,149 @@ +name: bld_docker +run-name: ${{ inputs.docker_name }} + +permissions: + checks: write + contents: read + issues: read + pull-requests: write + +on: + workflow_call: + inputs: + docker_name: + description: 'Name of the docker image to build' + required: false + default: "orcid/version-bumping-test" + type: string + context: + description: 'Name of the context in the repo' + required: false + default: "." + type: string + build_args: + description: 'arguments' + required: false + default: "" + type: string + file: + description: 'specify a custom dockerfile' + required: false + default: "" + type: string + version_tag: + description: 'Name of the tag to build' + required: false + default: 'latest' + type: string + bump: + description: 'whether to bump the version number by a major minor patch amount or none' + required: false + default: 'patch' + type: string + ref: + description: 'git reference to use with the checkout use default_branch to have that calculated' + required: false + default: "default" + type: string + + workflow_dispatch: + inputs: + docker_name: + description: 'Name of the docker image to build' + required: false + default: "orcid/version-bumping-test" + type: string + context: + description: 'Name of the context in the repo' + required: false + default: "." + type: string + build_args: + description: 'arguments' + required: false + default: "" + type: string + file: + description: 'specify a custom dockerfile' + required: false + default: "" + type: string + version_tag: + description: 'Name of the tag to build' + required: false + default: 'latest' + type: string + bump: + description: 'whether to bump the version number by a major minor patch amount or none' + required: false + default: 'patch' + type: string + ref: + description: 'git reference to use with the checkout use default_branch to have that calculated' + required: false + default: "default" + type: string + + +jobs: + bld_docker: + runs-on: ubuntu-latest + steps: + - name: git-checkout-ref-action + id: ref + uses: ORCID/git-checkout-ref-action@main + with: + default_branch: ${{ github.event.repository.default_branch }} + ref: ${{ inputs.ref }} + + - uses: actions/checkout@v3 + with: + ref: ${{ steps.ref.outputs.ref }} + # checkout some history so we can scan commits for bump messages + # NOTE: history does not include tags! + fetch-depth: 100 + + - name: find next version + id: version + uses: ORCID/version-bump-action@main + with: + version_tag: ${{ inputs.version_tag }} + bump: ${{ inputs.bump }} + + - uses: docker/setup-buildx-action@v2 + - uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + # each cache needs a unique key for the job + key: ${{ runner.os }}-buildx-${{ hashFiles(inputs.context) }} + # Alternative restore keys if no exact match is found + # I /think/ this means that other docker buildx jobs could help out here + restore-keys: | + ${{ runner.os }}-buildx- + - name: Login to private registry + uses: docker/login-action@v2 + with: + registry: ${{ secrets.DOCKER_REG_PRIVATE }} + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: nasty hack to allow dynamic defaults + id: dynamic_defaults + run: | + FILE="${{ github.event.inputs.file }}" + echo "default_file=${FILE:-${{ inputs.context }}/Dockerfile}" >> "$GITHUB_OUTPUT" + + - name: show the dynamic defaults + run: | + echo ${{ steps.dynamic_defaults.outputs.default_file }} + + - uses: docker/build-push-action@v3 + with: + push: true + tags: ${{ secrets.DOCKER_REG_PRIVATE }}/${{ inputs.docker_name}}:${{ steps.version.outputs.version_tag_numeric }} + context: ${{ inputs.context }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + build-args: ${{ inputs.build_args }} + file: ${{ steps.dynamic_defaults.outputs.default_file }} + diff --git a/.github/workflows/build_test_release.yml b/.github/workflows/build_test_release.yml index 602304b4ad..209d9196d2 100644 --- a/.github/workflows/build_test_release.yml +++ b/.github/workflows/build_test_release.yml @@ -98,3 +98,20 @@ jobs: bump: ${{ inputs.bump }} ref: ${{ inputs.ref }} + bld_all_docker: + uses: ./.github/workflows/bld_all_docker.yml + secrets: inherit # pass all secrets for uploading assets + needs: + - lint + - bld_all_yarn + - format_i18n + - format_prettier + permissions: + checks: write + contents: read + issues: read + pull-requests: write + with: + version_tag: ${{ inputs.version_tag }} + bump: ${{ inputs.bump }} + ref: ${{ inputs.ref }} diff --git a/.github/workflows/build_test_release_tag.yml b/.github/workflows/build_test_release_tag.yml index 179b1b0339..2bb93024de 100644 --- a/.github/workflows/build_test_release_tag.yml +++ b/.github/workflows/build_test_release_tag.yml @@ -98,6 +98,24 @@ jobs: bump: ${{ inputs.bump }} ref: ${{ inputs.ref }} + bld_all_docker: + uses: ./.github/workflows/bld_all_docker.yml + secrets: inherit # pass all secrets for uploading assets + needs: + - lint + - bld_all_yarn + - format_i18n + - format_prettier + permissions: + checks: write + contents: read + issues: read + pull-requests: write + with: + version_tag: ${{ inputs.version_tag }} + bump: ${{ inputs.bump }} + ref: ${{ inputs.ref }} + ############################################################################## rel_tag: diff --git a/CHANGELOG.md b/CHANGELOG.md index f8e3dd7cb3..c732744df0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +## v2.106.3 - 2024-10-10 + +[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.106.2...v2.106.3) + +## v2.106.2 - 2024-10-09 + +[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.106.1...v2.106.2) + +## v2.106.1 - 2024-10-09 + +[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.106.0...v2.106.1) + +## v2.106.0 - 2024-10-09 + +[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.105.7...v2.106.0) + ## v2.105.7 - 2024-10-02 [Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.105.6...v2.105.7) diff --git a/Dockerfile.build b/Dockerfile.build new file mode 100644 index 0000000000..fe7a968c0b --- /dev/null +++ b/Dockerfile.build @@ -0,0 +1,36 @@ +# dependencies docker build + +# match version from .tool-versions +FROM maven:3.6.3-jdk-11 AS maven + +ARG build_env + +WORKDIR /build + +# copy only poms for max cachability of just dependency downloads +COPY pom.xml . + +# download maven dependencies and ignore that some components will fail +RUN mvn -T 1C --batch-mode dependency:resolve --fail-never -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + +COPY ./scripts ./scripts +# for yarn build +COPY *.json . +COPY *.lock . + +COPY ./src ./src + +RUN mvn -T 1C --batch-mode \ + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ + --file "pom.xml" \ + --activate-profiles "${build_env}" -Dnodejs.workingDirectory=. \ + package -Dmaven.test.skip + + +# For Java 11 and Tomcat 9 +#FROM tomcat:9.0.93-jdk11-temurin-jammy +FROM tomcat:9.0.91-jdk11-temurin-focal + +# copy war file from build +COPY --from=maven /build/target/*.war /usr/local/tomcat/webapps/orcid-frontend.war + diff --git a/build-docker.sh b/build-docker.sh new file mode 100755 index 0000000000..68879e704b --- /dev/null +++ b/build-docker.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +docker compose -f docker-compose.build.yml build diff --git a/docker-compose.build.yml b/docker-compose.build.yml new file mode 100644 index 0000000000..1836d1b619 --- /dev/null +++ b/docker-compose.build.yml @@ -0,0 +1,12 @@ +version: '2' +services: + angular: + image: ${DOCKER_REG_PRIVATE}/orcid/registry/orcid-angular:${TAG:-0.0.1} + #entrypoint: sleep infinity + build: + context: . + dockerfile: Dockerfile.build + args: + build_env: ${BUILD_ENV:-prod} + ports: + - 0.0.0.0:13105:8080 diff --git a/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.scss b/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.scss index 7c2a53dde2..199aebf60f 100644 --- a/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.scss +++ b/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.scss @@ -2,6 +2,8 @@ width: 100%; display: flex; justify-content: center; + height: 100vh; + overflow: scroll; } main.stand-alone-mode { diff --git a/src/app/developer-tools/components/terms-of-use/terms-of-use.component.html b/src/app/developer-tools/components/terms-of-use/terms-of-use.component.html index 895fab59eb..91f92fc454 100644 --- a/src/app/developer-tools/components/terms-of-use/terms-of-use.component.html +++ b/src/app/developer-tools/components/terms-of-use/terms-of-use.component.html @@ -8,50 +8,73 @@

- ORCID offers an API (Application Programming Interface) that allows your - systems and applications to connect to the ORCID registry via - machine-to-machine communication. Using the Public API, your system or - application can: + ORCID offers a free Public API (Application Programming Interface) that allows + your systems and applications to connect to the ORCID registry for + non-commercial use +

+

+ By registering for Public API Credentials, your system or application can:

The ORCID API is RESTful and usesThe ORCID Public API is RESTful and uses OAuth 2.0OAuth, a well-established, standard protocol for user-based - permissions. + >, a well-established, standard protocol for user-based permissions. +

- Public Client Applications are granted to individuals and not organizations, - and your Public Client is personal to you (even if you are using it in + Public API Credentials are granted to individuals and not organizations, and + your Public API Credentials are personal to you (even if being used in connection with your work for an organization).

+

+ + If you need access to an ORCID API for commercial use, need a higher usage + quota, organizational administration of your API credentials, or the ability + to write data to or access Trusted Party data in ORCID records, our + + + Member API + + + is available to ORCID member organizations. + +

+

Additional resources

@@ -60,7 +83,7 @@

  • class="orc-font-body-large no-margin-bottom" i18n="@@developerTools.orcidPublicClientTermsOfService" > - ORCID Public Client Terms of Service + ORCID Public APIs Terms of Service

  • @@ -91,10 +114,8 @@

    - The ORCID Public API allows you to request permission to receive an - authenticated ORCID iD, to read public information from an ORCID record and - to search public data on the ORCID registry according to the conditions - stated in the + The ORCID Public API is free for non-commercial use by individuals as stated + in the target="_blank" class="underline" i18n="@@developerTools.publicClientTermsOfService" - >Public Client Terms of Service.Public APIs Terms of Service. + + By “non-commercial” we mean that you may not charge any re-use fees for the + Public API, and you may not make use of the Public API in connection with + any revenue-generating product or service +

    @@ -128,9 +154,8 @@

    [(ngModel)]="checked" [disabled]="!emailAlreadyVerified" i18n="@@developerTools.haveReadAndAgreeToTheOrcidPublicClientTermsOfService" - >I have read and agree to the ORCID Public Client Terms of - Service + >I have read and agree to the ORCID Public APIs Terms of Service +

    diff --git a/src/locale/properties/developer-tools/developer-tools.en.properties b/src/locale/properties/developer-tools/developer-tools.en.properties index 100ee8178f..a20d307060 100644 --- a/src/locale/properties/developer-tools/developer-tools.en.properties +++ b/src/locale/properties/developer-tools/developer-tools.en.properties @@ -4,23 +4,23 @@ developerTools.ressettingYourClientSecret=Resetting your client secret will gene developerTools.developerTools=Developer tools developerTools.thisSectionIsIntended=This section is intended for developers who plan to integrate ORCID into their system using the ORCID Public API. developerTools.gettingStarted=Getting started with the free ORCID Public API -developerTools.orcidOffersAnApi=ORCID offers an API (Application Programming Interface) that allows your systems and applications to connect to the ORCID registry via machine-to-machine communication. Using the Public API, your system or application can: -developerTools.allowUserToSignInto=Allow users to sign into your system/application with their ORCID username and password -developerTools.getAUserAuthenticated=Get a user's authenticated ORCID iD -developerTools.retrieveMachineReadable=Retrieve a machine-readable version of a user's public ORCID record -developerTools.performMachineSearch=Perform a machine-generated search of the ORCID registry -developerTools.orcidApiResful=The ORCID API is RESTful and uses -developerTools.oauth20=OAuth 2.0 +developerTools.orcidOffersAnApi=ORCID offers a free Public API (Application Programming Interface) that allows your systems and applications to connect to the ORCID registry for non-commercial use +developerTools.allowUserToSignInto=Allow users to sign into your system/application with their ORCID account +developerTools.getAUserAuthenticated=Obtain a user's’ authenticated ORCID iDs +developerTools.retrieveMachineReadable=Read public information from ORCID records in machine-readable format +developerTools.performMachineSearch=Search public data in the ORCID Registry +developerTools.orcidApiResful=The ORCID Public API is RESTful and uses +developerTools.oauth20=OAuth developerTools.wellEstablishedStandard=, a well-established, standard protocol for user-based permissions. -developerTools.publicClientApplicationsAreGranted=Public Client Applications are granted to individuals and not organizations, and your Public Client is personal to you (even if you are using it in connection with your work for an organization). +developerTools.publicClientApplicationsAreGranted=Public API Credentials are granted to individuals and not organizations, and your Public API Credentials are personal to you (even if being used in connection with your work for an organization). developerTools.additionalResources=Additional resources developerTools.readThePublicApisDocumentation=Read the Public API documentation developerTools.fillOutMoreAobutTheDifferences=Find out more about the differences between the Public and Member APIs -developerTools.orcidPublicClientTermsOfService=ORCID Public Client Terms of Service -developerTools.theOrcidPublicApiAllowsYouToRequestPermission=The ORCID Public API allows you to request permission to receive an authenticated ORCID iD, to read public information from an ORCID record and to search public data on the ORCID registry according to the conditions stated in the -developerTools.publicClientTermsOfService=Public Client Terms of Service. +developerTools.orcidPublicClientTermsOfService=ORCID Public APIs Terms of Service +developerTools.theOrcidPublicApiAllowsYouToRequestPermission=The ORCID Public API is free for non-commercial use by individuals as stated in the +developerTools.publicClientTermsOfService=Public APIs Terms of Service. developerTools.youMustAcceptThePublicClientTermsOfService=You must accept the Public Client Terms of Service before you can register for your Public API credentials. -developerTools.haveReadAndAgreeToTheOrcidPublicClientTermsOfService=I have read and agree to the ORCID Public Client Terms of Service +developerTools.haveReadAndAgreeToTheOrcidPublicClientTermsOfService=I have read and agree to the ORCID Public APIs Terms of Service developerTools.registerForYourOrcidPublicApiCredentials=Register for your ORCID Public API credentials developerTools.warningDuplicated=You’ve registered for your ORCID Public API credentials developerTools.addYourApplicationDetails=Add your application details and one or more redirect URIs in the form below. Once these details are saved we’ll generate your client ID and secret so you can start using the Public API right away. @@ -76,3 +76,9 @@ developerTools.replaceWithRedirect=REPLACE WITH REDIRECT URI developerTools.replaceWithOauth=REPLACE WITH OAUTH CODE developerTools.backToMyRecod=Back to my record developerTools.exampleCode2=example code +developerTools.orcidOffersAnApi2=By registering for Public API Credentials, your system or application can: +developerTools.obtainHigher=Obtain a higher usage quota than the ORCID Anonymous API +developerTools.publicClientApplicationsAreGranted2=If you need access to an ORCID API for commercial use, need a higher usage quota, organizational administration of your API credentials, or the ability to write data to or access Trusted Party data in ORCID records, our +developerTools.memberApi=Member API +developerTools.mayBeMoreAppropriate=is available to ORCID member organizations. +developerTools.byRegisteringForPublicApi=By “non-commercial” we mean that you may not charge any re-use fees for the Public API, and you may not make use of the Public API in connection with any revenue-generating product or service diff --git a/src/locale/properties/developer-tools/developer-tools.lr.properties b/src/locale/properties/developer-tools/developer-tools.lr.properties index 6e5b29f27a..bb632f1791 100644 --- a/src/locale/properties/developer-tools/developer-tools.lr.properties +++ b/src/locale/properties/developer-tools/developer-tools.lr.properties @@ -76,3 +76,9 @@ developerTools.replaceWithRedirect=LR developerTools.replaceWithOauth=LR developerTools.backToMyRecod=LR developerTools.exampleCode2=LR +developerTools.orcidOffersAnApi2=LR +developerTools.obtainHigher=LR +developerTools.publicClientApplicationsAreGranted2=LR +developerTools.memberApi=LR +developerTools.mayBeMoreAppropriate=LR +developerTools.byRegisteringForPublicApi=LR diff --git a/src/locale/properties/developer-tools/developer-tools.rl.properties b/src/locale/properties/developer-tools/developer-tools.rl.properties index 7a4a094b51..ba57941984 100644 --- a/src/locale/properties/developer-tools/developer-tools.rl.properties +++ b/src/locale/properties/developer-tools/developer-tools.rl.properties @@ -76,3 +76,9 @@ developerTools.replaceWithRedirect=RL developerTools.replaceWithOauth=RL developerTools.backToMyRecod=RL developerTools.exampleCode2=RL +developerTools.orcidOffersAnApi2=RL +developerTools.obtainHigher=RL +developerTools.publicClientApplicationsAreGranted2=RL +developerTools.memberApi=RL +developerTools.mayBeMoreAppropriate=RL +developerTools.byRegisteringForPublicApi=RL diff --git a/src/locale/properties/developer-tools/developer-tools.xx.properties b/src/locale/properties/developer-tools/developer-tools.xx.properties index 0934b39256..55317fc15e 100644 --- a/src/locale/properties/developer-tools/developer-tools.xx.properties +++ b/src/locale/properties/developer-tools/developer-tools.xx.properties @@ -76,3 +76,9 @@ developerTools.replaceWithRedirect=X developerTools.replaceWithOauth=X developerTools.backToMyRecod=X developerTools.exampleCode2=X +developerTools.orcidOffersAnApi2=X +developerTools.obtainHigher=X +developerTools.publicClientApplicationsAreGranted2=X +developerTools.memberApi=X +developerTools.mayBeMoreAppropriate=X +developerTools.byRegisteringForPublicApi=X