Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remplacing static privileges to api key template id [ORG-825] #1486

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
npm i -g npm@latest
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
Expand All @@ -60,8 +60,8 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
npm i -g npm@latest
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
Expand All @@ -81,8 +81,8 @@ jobs:
# ID of the test run to identify resources to teardown.
TEST_RUN_ID: 'id${{ matrix.os }}-${{ github.sha }}-${{ github.run_attempt }}g'
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
Expand All @@ -101,11 +101,11 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
npm i -g npm@latest
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/checkout@v4
with:
# pulls all commits (needed for computing the next version)
fetch-depth: 0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
COVEO_DISABLE_AUTOUPDATE: true
CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/checkout@v4
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
if: ${{matrix.os == 'ubuntu-20.04'}}
with:
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
TEST_RUN_ID: '${{ github.sha }}-${{ github.run_attempt }}g'
CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/checkout@v4
- uses: ./.github/actions/e2e-clean
with:
cliConfigJson: ${{ env.CLI_CONFIG_JSON }}
Expand All @@ -211,11 +211,11 @@ jobs:
runs-on: ubuntu-20.04
environment: prerelease
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/checkout@v4
with:
# pulls all commits (needed for computing the next version)
fetch-depth: 0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
Expand Down
80 changes: 12 additions & 68 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@actions/github": "5.1.1",
"@commitlint/config-conventional": "17.6.1",
"@commitlint/lint": "17.6.1",
"@coveo/platform-client": "54.9.3",
"@coveo/platform-client": "57.6.0",
"@coveo/semantic-monorepo-tools": "2.4.28",
"@coveord/release": "1.0.0",
"@npmcli/arborist": "6.2.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@babel/preset-env": "7.21.5",
"@babel/preset-typescript": "7.21.5",
"@coveo/cli": "3.2.7",
"@coveo/platform-client": "54.9.3",
"@coveo/platform-client": "57.6.0",
"abortcontroller-polyfill": "1.7.5",
"async-retry": "1.3.3",
"babel-jest": "29.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@amplitude/analytics-node": "^1.3.3",
"@amplitude/analytics-types": "^2.1.2",
"@coveo/platform-client": "54.9.3",
"@coveo/platform-client": "57.6.0",
"@oclif/core": "1.24.0",
"abortcontroller-polyfill": "1.7.5",
"chalk": "4.1.2",
Expand Down
1 change: 0 additions & 1 deletion packages/cli/commons/src/platform/authenticatedClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export class AuthenticatedClient {
},
},
}),
enabled: true,
privileges: [
{targetDomain: 'IMPERSONATE', targetId: '*', owner: 'SEARCH_API'},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@amplitude/identify": "^1.9.0",
"@coveo/cli-commons": "2.9.4",
"@coveo/cli-plugin-source": "2.3.4",
"@coveo/platform-client": "54.9.3",
"@coveo/platform-client": "57.6.0",
"@oclif/core": "1.24.0",
"@oclif/plugin-help": "5.1.23",
"@oclif/plugin-plugins": "2.1.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"dependencies": {
"@coveo/cli-commons": "2.9.4",
"@coveo/platform-client": "54.9.3",
"@coveo/platform-client": "57.6.0",
"@coveo/push-api-client": "4.0.1",
"@oclif/core": "1.24.0",
"@oclif/plugin-help": "5.1.23",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/atomic/create-atomic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"access": "public"
},
"dependencies": {
"@coveo/platform-client": "54.9.3",
"@coveo/platform-client": "57.6.0",
"abortcontroller-polyfill": "1.7.5",
"detect-indent": "7.0.1",
"https-proxy-agent": "5.0.1",
Expand Down
37 changes: 16 additions & 21 deletions packages/ui/atomic/create-atomic/src/plopfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,24 @@ export default function (plop: NodePlopAPI) {
searchHub: string,
platformClient: PlatformClient
) {
return await platformClient.apiKey.create({
displayName: `cli-${name}`,
description: 'Generated by the Coveo CLI',
...(searchHub && {
additionalConfiguration: {
search: {
enforcedQueryPipelineConfiguration: {
searchHub,
return await platformClient.apiKey.create(
{
displayName: `cli-${name}`,
description: 'Generated by the Coveo CLI',
...(searchHub && {
additionalConfiguration: {
search: {
enforcedQueryPipelineConfiguration: {
searchHub,
},
},
},
},
}),
enabled: true,
privileges: [
{targetDomain: 'EXECUTE_QUERY', targetId: '*', owner: 'SEARCH_API'},
{
targetDomain: 'ANALYTICS_DATA',
targetId: '*',
owner: 'USAGE_ANALYTICS',
type: 'EDIT',
},
],
});
}),
},
{
apiKeyTemplateId: 'AnonymousSearch',
}
);
}

plop.setHelper('inc', (value) => parseInt(value) + 1);
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/search-token-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"directory": "packages/ui/search-token-server"
},
"dependencies": {
"@coveo/platform-client": "52.1.0",
"@coveo/platform-client": "57.6.0",
"@types/express": "^4.17.11",
"abortcontroller-polyfill": "^1.7.1",
"cookie-session": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"zod": "^3.19.1"
},
"devDependencies": {
"@coveo/platform-client": "54.9.3",
"@coveo/platform-client": "57.6.0",
"@rushstack/eslint-patch": "^1.1.4",
"@types/node": "18.16.3",
"@vitejs/plugin-vue": "^4.0.0",
Expand Down
Loading