Realm settings(keys): add ECDSA provider details (#850)
* parenta03c8fc79b
author jenny-s51 <jshandel@redhat.com> 1624022352 -0400 committer jenny-s51 <jshandel@redhat.com> 1626287571 -0400 parenta03c8fc79b
author jenny-s51 <jshandel@redhat.com> 1624022352 -0400 committer jenny-s51 <jshandel@redhat.com> 1626287382 -0400 parenta03c8fc79b
author jenny-s51 <jshandel@redhat.com> 1624022352 -0400 committer jenny-s51 <jshandel@redhat.com> 1626286966 -0400 wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) Bump react-i18next from 11.7.0 to 11.11.0 (#733) Bumps [react-i18next](https://github.com/i18next/react-i18next) from 11.7.0 to 11.11.0. - [Release notes](https://github.com/i18next/react-i18next/releases) - [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/react-i18next/compare/v11.7.0...v11.11.0) --- updated-dependencies: - dependency-name: react-i18next dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @typescript-eslint/eslint-plugin from 3.8.0 to 3.10.1 (#731) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.8.0 to 3.10.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.10.1/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @jest/types from 26.6.2 to 27.0.2 (#730) Bumps [@jest/types](https://github.com/facebook/jest/tree/HEAD/packages/jest-types) from 26.6.2 to 27.0.2. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v27.0.2/packages/jest-types) --- updated-dependencies: - dependency-name: "@jest/types" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump eslint from 7.6.0 to 7.29.0 (#734) Bump @patternfly/react-table from 4.27.24 to 4.29.0 (#732) Bumps [@patternfly/react-table](https://github.com/patternfly/patternfly-react) from 4.27.24 to 4.29.0. - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@4.27.24...@patternfly/react-table@4.29.0) --- updated-dependencies: - dependency-name: "@patternfly/react-table" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixed issue fixing: #706 fixed types fixed lint fixed description coll with and make text truncate removed member count column right align kebab Fixed these 2 issues: (#741) * fix order of alerts where the newest is on the top * removed double loading indicator * fixes showing old alerts again Realm settings(localization): Add bundle functionality (#739) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Fixing UXD review for user (#648) * Introduced new GroupPicker. Can be used for move group or join group * Moved help texts to help.json * don't set state when there was no request * add pagination * remove "Groups" link on root level * use path in chip instread of name * fixes filtering to show search not found and removes `+1` logic from pager * fix breadcrumb and layout * fixed all the tests Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 updated admin client with new endpoints (#725) fix add function and add test remove aes provider changes remove comments format update cypress test update add bundle function fix test remove comment * remove merge conflict markers * more markers * format fixed type of save button Fix localization bug (#747) * wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix localization bug remove files * format fixed bad testids (#748) Update to Patternfly 4.115.2 (latest release) (#737) * update to latest PF * fix tests Bump eslint from 7.29.0 to 7.30.0 Bumps [eslint](https://github.com/eslint/eslint) from 7.29.0 to 7.30.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.29.0...v7.30.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump @typescript-eslint/parser from 3.8.0 to 3.10.1 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.8.0 to 3.10.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.10.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump postcss-import from 12.0.1 to 14.0.2 Bumps [postcss-import](https://github.com/postcss/postcss-import) from 12.0.1 to 14.0.2. - [Release notes](https://github.com/postcss/postcss-import/releases) - [Changelog](https://github.com/postcss/postcss-import/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-import/compare/12.0.1...14.0.2) --- updated-dependencies: - dependency-name: postcss-import dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Bump @testing-library/react from 11.2.7 to 12.0.0 Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.2.7 to 12.0.0. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v11.2.7...v12.0.0) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Bump cypress from 7.5.0 to 7.6.0 Bumps [cypress](https://github.com/cypress-io/cypress) from 7.5.0 to 7.6.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](https://github.com/cypress-io/cypress/compare/v7.5.0...v7.6.0) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump postcss from 8.3.3 to 8.3.5 Bumps [postcss](https://github.com/postcss/postcss) from 8.3.3 to 8.3.5. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.3.3...8.3.5) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump react-dom from 16.13.1 to 16.14.0 Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 16.13.1 to 16.14.0. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v16.14.0/packages/react-dom) --- updated-dependencies: - dependency-name: react-dom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump prettier from 2.1.2 to 2.2.1 Bumps [prettier](https://github.com/prettier/prettier) from 2.1.2 to 2.2.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.1.2...2.2.1) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> bumped babel-core dependency to 7.11.5 Increase Dependabot PR limit Bump react-hook-form from 6.15.1 to 6.15.8 Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 6.15.1 to 6.15.8. - [Release notes](https://github.com/react-hook-form/react-hook-form/releases) - [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md) - [Commits](https://github.com/react-hook-form/react-hook-form/compare/v6.15.1...v6.15.8) --- updated-dependencies: - dependency-name: react-hook-form dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump @types/react-dom from 16.9.5 to 17.0.8 Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 16.9.5 to 17.0.8. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) --- updated-dependencies: - dependency-name: "@types/react-dom" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Bump @jest/types from 27.0.2 to 27.0.6 Bumps [@jest/types](https://github.com/facebook/jest/tree/HEAD/packages/jest-types) from 27.0.2 to 27.0.6. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v27.0.6/packages/jest-types) --- updated-dependencies: - dependency-name: "@jest/types" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump use-react-router-breadcrumbs from 2.0.0 to 2.0.2 Bumps [use-react-router-breadcrumbs](https://github.com/icd2k3/use-react-router-breadcrumbs) from 2.0.0 to 2.0.2. - [Release notes](https://github.com/icd2k3/use-react-router-breadcrumbs/releases) - [Commits](https://github.com/icd2k3/use-react-router-breadcrumbs/compare/2.0.0...2.0.2) --- updated-dependencies: - dependency-name: use-react-router-breadcrumbs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump @snowpack/plugin-postcss from 1.4.0 to 1.4.3 Bumps [@snowpack/plugin-postcss](https://github.com/snowpackjs/snowpack/tree/HEAD/plugins/plugin-postcss) from 1.4.0 to 1.4.3. - [Release notes](https://github.com/snowpackjs/snowpack/releases) - [Changelog](https://github.com/snowpackjs/snowpack/blob/main/plugins/plugin-postcss/CHANGELOG.md) - [Commits](https://github.com/snowpackjs/snowpack/commits/@snowpack/plugin-postcss@1.4.3/plugins/plugin-postcss) --- updated-dependencies: - dependency-name: "@snowpack/plugin-postcss" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump @snowpack/plugin-webpack from 2.3.1 to 3.0.0 Bumps [@snowpack/plugin-webpack](https://github.com/snowpackjs/snowpack/tree/HEAD/plugins/plugin-webpack) from 2.3.1 to 3.0.0. - [Release notes](https://github.com/snowpackjs/snowpack/releases) - [Changelog](https://github.com/snowpackjs/snowpack/blob/main/plugins/plugin-webpack/CHANGELOG.md) - [Commits](https://github.com/snowpackjs/snowpack/commits/@snowpack/plugin-webpack@3.0.0/plugins/plugin-webpack) --- updated-dependencies: - dependency-name: "@snowpack/plugin-webpack" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Bump typescript from 4.2.4 to 4.3.5 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.4 to 4.3.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.2.4...v4.3.5) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump eslint-plugin-react from 7.23.2 to 7.24.0 Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.23.2 to 7.24.0. - [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases) - [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.23.2...v7.24.0) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump @types/react from 16.9.23 to 17.0.13 Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 16.9.23 to 17.0.13. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Bump i18next from 20.3.1 to 20.3.2 Bumps [i18next](https://github.com/i18next/i18next) from 20.3.1 to 20.3.2. - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v20.3.1...v20.3.2) --- updated-dependencies: - dependency-name: i18next dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump @snowpack/app-scripts-react from 1.10.0 to 1.12.6 Bumps [@snowpack/app-scripts-react](https://github.com/snowpackjs/snowpack/tree/HEAD/create-snowpack-app/app-scripts-react) from 1.10.0 to 1.12.6. - [Release notes](https://github.com/snowpackjs/snowpack/releases) - [Changelog](https://github.com/snowpackjs/snowpack/blob/main/CHANGELOG.md) - [Commits](https://github.com/snowpackjs/snowpack/commits/@snowpack/app-scripts-react@1.12.6/create-snowpack-app/app-scripts-react) --- updated-dependencies: - dependency-name: "@snowpack/app-scripts-react" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Update Prettier to latest version and fix formatting Update @typescript-eslint to latest version and fix issues Fix Storybook server and update to latest version - Fix build for Storybook - Update Storybook and dependencies to latest version - Update Storybook files from React template - Add task to CI to verify Storybook build Revert "Bump typescript from 4.2.4 to 4.3.5" This reverts commitcb653cee68
. sessions: added sessions type dropdown sessions: re-formatted code sessions: removed unused key sessions: improved dropdown sessions: added texts to messages.json Bump @typescript-eslint/parser from 4.28.1 to 4.28.2 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.1 to 4.28.2. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.2/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Changed the group picker to reflect the updated design (#743) Instantly paste large resource files in Cypress tests Drop snapshot tests in Jest Bump @types/snowpack-env from 2.3.3 to 2.3.4 Bumps [@types/snowpack-env](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/snowpack-env) from 2.3.3 to 2.3.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/snowpack-env) --- updated-dependencies: - dependency-name: "@types/snowpack-env" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump react-i18next from 11.11.0 to 11.11.1 Bumps [react-i18next](https://github.com/i18next/react-i18next) from 11.11.0 to 11.11.1. - [Release notes](https://github.com/i18next/react-i18next/releases) - [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/react-i18next/compare/v11.11.0...v11.11.1) --- updated-dependencies: - dependency-name: react-i18next dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump @types/jest from 26.0.23 to 26.0.24 Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.23 to 26.0.24. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Convert DataLoader test to use React Testing Library Convert FormAccess test to use React Testing Library Convert ConfirmDialog test to use React Testing Library Convert MapperDialog test to use React Testing Library Bump @types/lodash from 4.14.170 to 4.14.171 Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.170 to 4.14.171. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) --- updated-dependencies: - dependency-name: "@types/lodash" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Remove Enzyme from testing suite format Update to React 17 Update ts-node to latest version Use WebPack 5 for Storybook builds Switch to NPM as the default package manager Disable WebPack production build to pass tests Optimize performance of Cypress tests on CI (#809) - Disable uploads for videos of tests that have passed - Disable compression of videos to speed up runs Bump snowpack from 2.11.1 to 2.18.5 Bumps [snowpack](https://github.com/snowpackjs/snowpack) from 2.11.1 to 2.18.5. - [Release notes](https://github.com/snowpackjs/snowpack/releases) - [Changelog](https://github.com/snowpackjs/snowpack/blob/main/CHANGELOG.md) - [Commits](https://github.com/snowpackjs/snowpack/commits) --- updated-dependencies: - dependency-name: snowpack dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Added accessability fixes fixed dependencies in package-lock.json fixed dependencies in package-lock.json Added Security Defenses tab in the realm settings (#738) * initial version of the Security defenses tab * disable when not dirty * added test * removed unsessary fetches * fixed format * fixed tests * fixed title * Update src/realm-settings/security-defences/BruteForceDetection.tsx Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> * Update src/realm-settings/messages.json Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> * fixed test Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Revert "Ay11" added accessibility fixes Bump @storybook/addon-links from 6.3.2 to 6.3.4 Bumps [@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/addons/links) from 6.3.2 to 6.3.4. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.3.4/addons/links) --- updated-dependencies: - dependency-name: "@storybook/addon-links" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump @storybook/addon-actions from 6.3.2 to 6.3.4 Bumps [@storybook/addon-actions](https://github.com/storybookjs/storybook/tree/HEAD/addons/actions) from 6.3.2 to 6.3.4. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v6.3.4/addons/actions) --- updated-dependencies: - dependency-name: "@storybook/addon-actions" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump ts-node from 10.0.0 to 10.1.0 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.0.0 to 10.1.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v10.0.0...v10.1.0) --- updated-dependencies: - dependency-name: ts-node dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump cypress from 7.6.0 to 7.7.0 Bumps [cypress](https://github.com/cypress-io/cypress) from 7.6.0 to 7.7.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](https://github.com/cypress-io/cypress/compare/v7.6.0...v7.7.0) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump @types/file-saver from 2.0.2 to 2.0.3 Bumps [@types/file-saver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/file-saver) from 2.0.2 to 2.0.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/file-saver) --- updated-dependencies: - dependency-name: "@types/file-saver" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> added acessibility fixes added acessibility fixes parenta03c8fc79b
(#729) author jenny-s51 <jshandel@redhat.com> 1624022352 -0400 committer jenny-s51 <jshandel@redhat.com> 1625159705 -0400 wip provider details provider details wip move files wip wip wip all provider details remove controllers save and update working address console warnings remove log stmt update test keep aes only remove comments remove unused hook and function remove unused props revert ldap logs fix conflict and remove duplicate function format and cypress test Partial import phase 2 (#702) * Process the JSON and present user options * Finish checkboxes. Refactor. * Add tests * Refactor after rebase * Add more test data for manual testing. * Fix linting errors * Put JsonFileUpload back the way it was. * Clean up comments * Update src/realm-settings/PartialImport.tsx Remove comment Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Localization tab (#685) * localization wip wip localization return key value data as array localization table css lint lint clean up log stmts clean up log stmts * PR feedback from Erik * fix logic for supported locales * update empty state text * set default value * fix cypress test * Update src/realm-settings/RealmSettingsSection.tsx Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> * fix rsa-generated delete bug; PR feedback frog Erik * revert locale abbreviation * remove log stmts * PR feedback from Erik, fix undefined * fix loader w Erik Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> add divider on section Prepare for first alpha release (#711) use typeahead for mapper list fix test Default roles: UI Changes from KEYCLOAK-14846 (#693) * defaultRoles wip default role changes done clean up log stmts update snapshot fix masthead test * fix cypress test * fix tabs Comment out Realm role CRUD test (#712) * Bogus change * Bogus change * Comment out Realm role CRUD test Bump postcss-cli from 7.1.1 to 8.3.1 (#718) Bumps [postcss-cli](https://github.com/postcss/postcss-cli) from 7.1.1 to 8.3.1. - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/7.1.1...8.3.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/jest-dom from 5.12.0 to 5.14.1 (#717) Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.12.0 to 5.14.1. - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v5.12.0...v5.14.1) --- updated-dependencies: - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fixing issue (#709) * fixing issue fixing: #680 * added kebab on row * added more clear group seperation Bump cypress from 7.4.0 to 7.5.0 (#715) Bump @babel/preset-typescript from 7.13.0 to 7.14.5 (#714) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.13.0 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump @testing-library/react from 10.4.6 to 11.2.7 (#716) Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 10.4.6 to 11.2.7. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.6...v11.2.7) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> inherited roles disabled instead of non selectable more style fixes fixed size change title of tab add unassign kebab on row added help item on enable switch test email working, modal wip email connection done remove comment fix cypress test revert test file fdisable email prompting when user email entered prettier update cypress tests fix lint try fix cypress test try longer wait save and test connection make wait longer increase wait fix test disable test connection button if form fields not entered lint afix username/password fields fix test mark suggested change add modal button and input functions fixed default value warning fixing issue fixing: #650 remove provider form add delete cleanup function AESproviderDetails extend wait for video update test test wait after rebase remove comments remove log format format PR feedback from Jon Apply suggestions from Jon's code review Co-authored-by: Jon Koops <jonkoops@gmail.com> remove duplicate form form use array desctructuring Apply suggestions from code review Co-authored-by: Jon Koops <jonkoops@gmail.com> update useroutematch format format back to async pretty cypress test remove email verification switch toggle fix add provider on non-master realm cleaning up fix save fix save for other providers fix fetch fix runtime error remove unused import Apply suggestions from code review suggested changes for non-null assertions Co-authored-by: Jon Koops <jonkoops@gmail.com> make props required make provider type required use realm-settings file for translation format and roll back route changes Integrate Prettier into ESLint and fix linting issues Other changes: - Ensure that .tsx files are included in the linting process Add GIT hooks to run CI tasks before pushing rebase Add a 'Package Managers' section to the coding guidelines Convert JSON files for translations to TypeScript (#841) sessions: added cypress tests for session types dropdown display sessions: added cypress tests review changes Use a Snowpack plugin to enable React Fast Refresh (#845) Enable Strict Mode for React (#846) Upgrade PatternFly to a prerelease version (#847) Co-authored-by: jenny-s51 <jshandel@redhat.com> Run as theme (#840) * Build for Keycloak theme * Update based on lastest index.html changes. * Fix realm dropdown when home realm is not master. * Fix readme. * Fix linting errors. * Try to fix tests. * Address Jon's comments. ecdsa details update files to master update paths update more paths more paths Delete ECDSAGeneratedModal.tsx even more paths update import path remove conflict markers remove unused ecdsa modal file rebase to resolve conflict fix console warning and dropdown * delete assets * fix route-config spacing * fix forID on elliptic curve
This commit is contained in:
parent
57156cda98
commit
7d57da1567
7 changed files with 425 additions and 363 deletions
|
@ -59,7 +59,23 @@ describe("Realm settings", () => {
|
|||
return this;
|
||||
};
|
||||
|
||||
/*const addBundle = () => {
|
||||
const deleteProvider = (providerName: string) => {
|
||||
const keysUrl = `/auth/admin/realms/${realmName}/keys`;
|
||||
cy.intercept(keysUrl).as("keysFetch");
|
||||
|
||||
cy.getId("provider-name-link")
|
||||
.contains(providerName)
|
||||
.parent()
|
||||
.siblings(".pf-c-data-list__item-action")
|
||||
.click()
|
||||
.getId(realmSettingsPage.deleteAction)
|
||||
.click();
|
||||
cy.wait(500).getId(realmSettingsPage.modalConfirm).click();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
const addBundle = () => {
|
||||
const localizationUrl = `/auth/admin/realms/${realmName}/localization/en`;
|
||||
cy.intercept(localizationUrl).as("localizationFetch");
|
||||
|
||||
|
@ -71,7 +87,7 @@ describe("Realm settings", () => {
|
|||
cy.wait(["@localizationFetch"]);
|
||||
|
||||
return this;
|
||||
};*/
|
||||
};
|
||||
|
||||
it("Go to general tab", function () {
|
||||
sidebarPage.goToRealmSettings();
|
||||
|
@ -214,6 +230,17 @@ describe("Realm settings", () => {
|
|||
goToDetails();
|
||||
});
|
||||
|
||||
it("delete providers", () => {
|
||||
sidebarPage.goToRealmSettings();
|
||||
cy.getId("rs-keys-tab").click();
|
||||
|
||||
cy.getId("rs-providers-tab").click();
|
||||
|
||||
deleteProvider("test_aes-generated");
|
||||
deleteProvider("test_ecdsa-generated");
|
||||
deleteProvider("test_hmac-generated");
|
||||
deleteProvider("test_rsa-generated");
|
||||
});
|
||||
it("Test keys", () => {
|
||||
sidebarPage.goToRealmSettings();
|
||||
goToKeys();
|
||||
|
|
|
@ -1,359 +0,0 @@
|
|||
import React, { useState } from "react";
|
||||
import {
|
||||
AlertVariant,
|
||||
Button,
|
||||
ButtonVariant,
|
||||
FileUpload,
|
||||
Form,
|
||||
FormGroup,
|
||||
Modal,
|
||||
ModalVariant,
|
||||
Select,
|
||||
SelectOption,
|
||||
SelectVariant,
|
||||
Switch,
|
||||
TextInput,
|
||||
} from "@patternfly/react-core";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
|
||||
import { useAdminClient } from "../context/auth/AdminClient";
|
||||
import { useAlerts } from "../components/alert/Alerts";
|
||||
import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
|
||||
import { HelpItem } from "../components/help-enabler/HelpItem";
|
||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||
|
||||
type ECDSAGeneratedModalProps = {
|
||||
providerType: string;
|
||||
handleModalToggle: () => void;
|
||||
refresh: () => void;
|
||||
open: boolean;
|
||||
};
|
||||
|
||||
export const ECDSAGeneratedModal = ({
|
||||
providerType,
|
||||
handleModalToggle,
|
||||
open,
|
||||
refresh,
|
||||
}: ECDSAGeneratedModalProps) => {
|
||||
const { t } = useTranslation("realm-settings");
|
||||
const serverInfo = useServerInfo();
|
||||
const adminClient = useAdminClient();
|
||||
const { addAlert } = useAlerts();
|
||||
const { handleSubmit, control } = useForm({});
|
||||
const [isEllipticCurveDropdownOpen, setIsEllipticCurveDropdownOpen] =
|
||||
useState(false);
|
||||
const [isRSAalgDropdownOpen, setIsRSAalgDropdownOpen] = useState(false);
|
||||
|
||||
const [keyFileName, setKeyFileName] = useState("");
|
||||
const [certificateFileName, setCertificateFileName] = useState("");
|
||||
|
||||
const allComponentTypes =
|
||||
serverInfo.componentTypes?.["org.keycloak.keys.KeyProvider"] ?? [];
|
||||
|
||||
const save = async (component: ComponentRepresentation) => {
|
||||
try {
|
||||
await adminClient.components.create({
|
||||
...component,
|
||||
parentId: component.parentId,
|
||||
providerId: providerType,
|
||||
providerType: "org.keycloak.keys.KeyProvider",
|
||||
});
|
||||
handleModalToggle!();
|
||||
addAlert(t("saveProviderSuccess"), AlertVariant.success);
|
||||
refresh();
|
||||
} catch (error) {
|
||||
addAlert(
|
||||
t("saveProviderError", {
|
||||
error: error.response?.data?.errorMessage || error,
|
||||
}),
|
||||
AlertVariant.danger
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
className="add-provider-modal"
|
||||
variant={ModalVariant.medium}
|
||||
title={t("addProvider")}
|
||||
isOpen={open}
|
||||
onClose={handleModalToggle}
|
||||
actions={[
|
||||
<Button
|
||||
data-testid="add-provider-button"
|
||||
key="confirm"
|
||||
variant="primary"
|
||||
type="submit"
|
||||
form="add-provider"
|
||||
>
|
||||
{t("common:Add")}
|
||||
</Button>,
|
||||
<Button
|
||||
id="modal-cancel"
|
||||
key="cancel"
|
||||
variant={ButtonVariant.link}
|
||||
onClick={() => {
|
||||
handleModalToggle!();
|
||||
}}
|
||||
>
|
||||
{t("common:cancel")}
|
||||
</Button>,
|
||||
]}
|
||||
>
|
||||
<Form
|
||||
isHorizontal
|
||||
id="add-provider"
|
||||
className="pf-u-mt-lg"
|
||||
onSubmit={handleSubmit(save!)}
|
||||
>
|
||||
<FormGroup
|
||||
label={t("consoleDisplayName")}
|
||||
fieldId="kc-console-display-name"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="realm-settings-help:displayName"
|
||||
forLabel={t("loginTheme")}
|
||||
forID="kc-console-display-name"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Controller
|
||||
name="name"
|
||||
control={control}
|
||||
defaultValue={providerType}
|
||||
render={({ onChange }) => (
|
||||
<TextInput
|
||||
aria-label={t("consoleDisplayName")}
|
||||
defaultValue={providerType}
|
||||
onChange={(value) => {
|
||||
onChange(value);
|
||||
}}
|
||||
data-testid="display-name-input"
|
||||
></TextInput>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={t("common:enabled")}
|
||||
fieldId="kc-enabled"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText={t("realm-settings-help:enabled")}
|
||||
forLabel={t("enabled")}
|
||||
forID="kc-enabled"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Controller
|
||||
name="config.enabled"
|
||||
control={control}
|
||||
defaultValue={["true"]}
|
||||
render={({ onChange, value }) => (
|
||||
<Switch
|
||||
id="kc-enabled"
|
||||
label={t("common:on")}
|
||||
labelOff={t("common:off")}
|
||||
isChecked={value[0] === "true"}
|
||||
data-testid={
|
||||
value[0] === "true"
|
||||
? "internationalization-enabled"
|
||||
: "internationalization-disabled"
|
||||
}
|
||||
onChange={(value) => {
|
||||
onChange([value + ""]);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={t("active")}
|
||||
fieldId="kc-active"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="realm-settings-help:active"
|
||||
forLabel={t("active")}
|
||||
forID="kc-active"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Controller
|
||||
name="config.active"
|
||||
control={control}
|
||||
defaultValue={["true"]}
|
||||
render={({ onChange, value }) => (
|
||||
<Switch
|
||||
id="kc-active"
|
||||
label={t("common:on")}
|
||||
labelOff={t("common:off")}
|
||||
isChecked={value[0] === "true"}
|
||||
data-testid={
|
||||
value[0] === "true"
|
||||
? "internationalization-enabled"
|
||||
: "internationalization-disabled"
|
||||
}
|
||||
onChange={(value) => {
|
||||
onChange([value + ""]);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
{providerType === "rsa" && (
|
||||
<>
|
||||
<FormGroup
|
||||
label={t("algorithm")}
|
||||
fieldId="kc-algorithm"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="realm-settings-help:algorithm"
|
||||
forLabel={t("algorithm")}
|
||||
forID="kc-algorithm"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Controller
|
||||
name="algorithm"
|
||||
control={control}
|
||||
defaultValue=""
|
||||
render={({ onChange, value }) => (
|
||||
<Select
|
||||
toggleId="kc-rsa-algorithm"
|
||||
onToggle={() =>
|
||||
setIsRSAalgDropdownOpen(!isRSAalgDropdownOpen)
|
||||
}
|
||||
onSelect={(_, value) => {
|
||||
onChange(value as string);
|
||||
setIsRSAalgDropdownOpen(false);
|
||||
}}
|
||||
selections={[value + ""]}
|
||||
variant={SelectVariant.single}
|
||||
aria-label={t("algorithm")}
|
||||
isOpen={isRSAalgDropdownOpen}
|
||||
data-testid="select-rsa-algorithm"
|
||||
>
|
||||
{allComponentTypes[4].properties[3].options!.map(
|
||||
(p, idx) => (
|
||||
<SelectOption
|
||||
selected={p === value}
|
||||
key={`rsa-algorithm-${idx}`}
|
||||
value={p}
|
||||
></SelectOption>
|
||||
)
|
||||
)}
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={t("privateRSAKey")}
|
||||
fieldId="kc-private-rsa-key"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="realm-settings-help:privateRSAKey"
|
||||
forLabel={t("privateRSAKey")}
|
||||
forID="kc-rsa-key"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Controller
|
||||
name="config.privateKey"
|
||||
control={control}
|
||||
defaultValue={[]}
|
||||
render={({ onChange, value }) => (
|
||||
<FileUpload
|
||||
id="importPrivateKey"
|
||||
type="text"
|
||||
value={value[0]}
|
||||
filenamePlaceholder="Upload a PEM file or paste key below"
|
||||
filename={keyFileName}
|
||||
onChange={(value, fileName) => {
|
||||
setKeyFileName(fileName);
|
||||
onChange([value]);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={t("x509Certificate")}
|
||||
fieldId="kc-aes-keysize"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="realm-settings-help:x509Certificate"
|
||||
forLabel={t("x509Certificate")}
|
||||
forID="kc-x509-certificate"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Controller
|
||||
name="config.certificate"
|
||||
control={control}
|
||||
defaultValue={[]}
|
||||
render={({ onChange, value }) => (
|
||||
<FileUpload
|
||||
id="importCertificate"
|
||||
type="text"
|
||||
value={value[0]}
|
||||
filenamePlaceholder="Upload a PEM file or paste key below"
|
||||
filename={certificateFileName}
|
||||
onChange={(value, fileName) => {
|
||||
setCertificateFileName(fileName);
|
||||
onChange([value]);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
</>
|
||||
)}
|
||||
{providerType === "ecdsa-generated" && (
|
||||
<FormGroup
|
||||
label={t("ellipticCurve")}
|
||||
fieldId="kc-algorithm"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="realm-settings-help:ellipticCurve"
|
||||
forLabel={t("emailTheme")}
|
||||
forID="kc-email-theme"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Controller
|
||||
name="config.ecdsaEllipticCurveKey"
|
||||
control={control}
|
||||
defaultValue={["P-256"]}
|
||||
render={({ onChange, value }) => (
|
||||
<Select
|
||||
toggleId="kc-elliptic"
|
||||
onToggle={() =>
|
||||
setIsEllipticCurveDropdownOpen(!isEllipticCurveDropdownOpen)
|
||||
}
|
||||
onSelect={(_, value) => {
|
||||
onChange([value + ""]);
|
||||
setIsEllipticCurveDropdownOpen(false);
|
||||
}}
|
||||
selections={[value + ""]}
|
||||
variant={SelectVariant.single}
|
||||
aria-label={t("emailTheme")}
|
||||
isOpen={isEllipticCurveDropdownOpen}
|
||||
placeholderText="Select one..."
|
||||
data-testid="select-email-theme"
|
||||
>
|
||||
{allComponentTypes[1].properties[3].options!.map((p, idx) => (
|
||||
<SelectOption
|
||||
selected={p === value}
|
||||
key={`email-theme-${idx}`}
|
||||
value={p}
|
||||
></SelectOption>
|
||||
))}
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
)}
|
||||
</Form>
|
||||
</Modal>
|
||||
);
|
||||
};
|
|
@ -40,7 +40,7 @@ import { Link, useRouteMatch } from "react-router-dom";
|
|||
import { AESGeneratedModal } from "./key-providers/aes-generated/AESGeneratedModal";
|
||||
import { JavaKeystoreModal } from "./JavaKeystoreModal";
|
||||
import { HMACGeneratedModal } from "./key-providers/hmac-generated/HMACGeneratedModal";
|
||||
import { ECDSAGeneratedModal } from "./ECDSAGeneratedModal";
|
||||
import { ECDSAGeneratedModal } from "./key-providers/ecdsa-generated/ECDSAGeneratedModal";
|
||||
import { RSAModal } from "./RSAModal";
|
||||
import { RSAGeneratedModal } from "./RSAGeneratedModal";
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ export const AESGeneratedModal = ({
|
|||
onClose={handleModalToggle}
|
||||
>
|
||||
<AESGeneratedForm
|
||||
providerType={providerType!}
|
||||
providerType={providerType}
|
||||
handleModalToggle={handleModalToggle}
|
||||
refresh={refresh}
|
||||
/>
|
||||
|
|
|
@ -0,0 +1,351 @@
|
|||
import React, { useState } from "react";
|
||||
import {
|
||||
ActionGroup,
|
||||
AlertVariant,
|
||||
Button,
|
||||
FormGroup,
|
||||
PageSection,
|
||||
Select,
|
||||
SelectOption,
|
||||
SelectVariant,
|
||||
Switch,
|
||||
TextInput,
|
||||
ValidatedOptions,
|
||||
} from "@patternfly/react-core";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
|
||||
import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
|
||||
import { HelpItem } from "../../../components/help-enabler/HelpItem";
|
||||
import { useServerInfo } from "../../../context/server-info/ServerInfoProvider";
|
||||
import { useAdminClient, useFetch } from "../../../context/auth/AdminClient";
|
||||
import { useParams, useRouteMatch } from "react-router-dom";
|
||||
import { FormAccess } from "../../../components/form-access/FormAccess";
|
||||
import { ViewHeader } from "../../../components/view-header/ViewHeader";
|
||||
import { convertToFormValues } from "../../../util";
|
||||
import { useAlerts } from "../../../components/alert/Alerts";
|
||||
|
||||
type ECDSAGeneratedFormProps = {
|
||||
handleModalToggle?: () => void;
|
||||
refresh?: () => void;
|
||||
editMode?: boolean;
|
||||
providerType?: string;
|
||||
};
|
||||
|
||||
export interface MatchParams {
|
||||
providerType: string;
|
||||
}
|
||||
|
||||
export const ECDSAGeneratedForm = ({
|
||||
editMode,
|
||||
providerType,
|
||||
handleModalToggle,
|
||||
refresh,
|
||||
}: ECDSAGeneratedFormProps) => {
|
||||
const { t } = useTranslation("realm-settings");
|
||||
const serverInfo = useServerInfo();
|
||||
const [isKeySizeDropdownOpen, setIsKeySizeDropdownOpen] = useState(false);
|
||||
|
||||
const adminClient = useAdminClient();
|
||||
const { addAlert } = useAlerts();
|
||||
|
||||
const { id } = useParams<{ id: string }>();
|
||||
|
||||
const providerId =
|
||||
useRouteMatch<MatchParams>("/:providerType?")?.params.providerType;
|
||||
|
||||
const save = async (component: ComponentRepresentation) => {
|
||||
try {
|
||||
if (id) {
|
||||
await adminClient.components.update(
|
||||
{ id },
|
||||
{
|
||||
...component,
|
||||
parentId: component.parentId,
|
||||
providerId: providerType,
|
||||
providerType: "org.keycloak.keys.KeyProvider",
|
||||
}
|
||||
);
|
||||
addAlert(t("saveProviderSuccess"), AlertVariant.success);
|
||||
} else {
|
||||
await adminClient.components.create({
|
||||
...component,
|
||||
parentId: component.parentId,
|
||||
providerId: providerType,
|
||||
providerType: "org.keycloak.keys.KeyProvider",
|
||||
});
|
||||
handleModalToggle?.();
|
||||
addAlert(t("saveProviderSuccess"), AlertVariant.success);
|
||||
refresh?.();
|
||||
}
|
||||
} catch (error) {
|
||||
addAlert(
|
||||
t("saveProviderError", {
|
||||
error: error.response?.data?.errorMessage || error,
|
||||
}),
|
||||
AlertVariant.danger
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const form = useForm<ComponentRepresentation>({ mode: "onChange" });
|
||||
|
||||
const setupForm = (component: ComponentRepresentation) => {
|
||||
form.reset();
|
||||
Object.entries(component).map(([key, value]) => {
|
||||
if (
|
||||
key === "config" &&
|
||||
component.config?.ecdsaEllipticCurveKey &&
|
||||
component.config?.active
|
||||
) {
|
||||
form.setValue("config.secretSize", value.ecdsaEllipticCurveKey[0]);
|
||||
|
||||
form.setValue("config.active", value.active[0]);
|
||||
|
||||
convertToFormValues(value, "config", form.setValue);
|
||||
}
|
||||
form.setValue(key, value);
|
||||
});
|
||||
};
|
||||
|
||||
useFetch(
|
||||
async () => {
|
||||
if (editMode) return await adminClient.components.findOne({ id: id });
|
||||
},
|
||||
(result) => {
|
||||
if (result) {
|
||||
setupForm(result);
|
||||
}
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
const allComponentTypes =
|
||||
serverInfo.componentTypes?.["org.keycloak.keys.KeyProvider"] ?? [];
|
||||
|
||||
const ecdsaEllipticCurveOptions = allComponentTypes[1].properties[3].options;
|
||||
|
||||
return (
|
||||
<FormAccess
|
||||
isHorizontal
|
||||
id="add-provider"
|
||||
className="pf-u-mt-lg"
|
||||
role="manage-realm"
|
||||
onSubmit={form.handleSubmit(save)}
|
||||
>
|
||||
{editMode && (
|
||||
<FormGroup
|
||||
label={t("providerId")}
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="client-scopes-help:mapperName"
|
||||
forLabel={t("common:name")}
|
||||
forID={t("common:helpLabel", { label: t("common:name") })}
|
||||
/>
|
||||
}
|
||||
fieldId="id"
|
||||
isRequired
|
||||
validated={
|
||||
form.errors.name ? ValidatedOptions.error : ValidatedOptions.default
|
||||
}
|
||||
helperTextInvalid={t("common:required")}
|
||||
>
|
||||
<TextInput
|
||||
ref={form.register()}
|
||||
id="id"
|
||||
type="text"
|
||||
name="id"
|
||||
isReadOnly={editMode}
|
||||
aria-label={t("consoleDisplayName")}
|
||||
defaultValue={id}
|
||||
data-testid="display-name-input"
|
||||
/>
|
||||
</FormGroup>
|
||||
)}
|
||||
<FormGroup
|
||||
label={t("common:name")}
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="client-scopes-help:mapperName"
|
||||
forLabel={t("common:name")}
|
||||
forID={t("common:helpLabel", { label: t("common:name") })}
|
||||
/>
|
||||
}
|
||||
fieldId="name"
|
||||
isRequired
|
||||
validated={
|
||||
form.errors.name ? ValidatedOptions.error : ValidatedOptions.default
|
||||
}
|
||||
helperTextInvalid={t("common:required")}
|
||||
>
|
||||
{!editMode && (
|
||||
<Controller
|
||||
name="name"
|
||||
control={form.control}
|
||||
defaultValue={providerType}
|
||||
render={({ onChange, value }) => {
|
||||
return (
|
||||
<TextInput
|
||||
id="name"
|
||||
type="text"
|
||||
aria-label={t("consoleDisplayName")}
|
||||
value={value}
|
||||
onChange={(value) => onChange(value)}
|
||||
data-testid="display-name-input"
|
||||
/>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{editMode && (
|
||||
<>
|
||||
<TextInput
|
||||
ref={form.register()}
|
||||
type="text"
|
||||
id="name"
|
||||
name="name"
|
||||
defaultValue={providerId}
|
||||
validated={
|
||||
form.errors.name
|
||||
? ValidatedOptions.error
|
||||
: ValidatedOptions.default
|
||||
}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={t("common:enabled")}
|
||||
fieldId="kc-enabled"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText={t("realm-settings-help:enabled")}
|
||||
forLabel={t("enabled")}
|
||||
forID={t("common:helpLabel", { label: t("enabled") })}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Controller
|
||||
name="config.enabled"
|
||||
control={form.control}
|
||||
defaultValue={["true"]}
|
||||
render={({ onChange, value }) => (
|
||||
<Switch
|
||||
id="kc-enabled-switch"
|
||||
label={t("common:on")}
|
||||
labelOff={t("common:off")}
|
||||
isChecked={value[0] === "true"}
|
||||
data-testid={value[0] === "true" ? "enabled" : "disabled"}
|
||||
onChange={(value) => {
|
||||
onChange([value.toString()]);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={t("active")}
|
||||
fieldId="kc-active"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="realm-settings-help:active"
|
||||
forLabel={t("active")}
|
||||
forID={t("common:helpLabel", { label: t("active") })}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Controller
|
||||
name="config.active"
|
||||
control={form.control}
|
||||
defaultValue={["true"]}
|
||||
render={({ onChange, value }) => {
|
||||
return (
|
||||
<Switch
|
||||
id="kc-active-switch"
|
||||
label={t("common:on")}
|
||||
labelOff={t("common:off")}
|
||||
isChecked={value[0] === "true"}
|
||||
data-testid={value[0] === "true" ? "active" : "passive"}
|
||||
onChange={(value) => {
|
||||
onChange([value.toString()]);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={t("ellipticCurve")}
|
||||
fieldId="kc-elliptic-curve"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="realm-settings-help:ellipticCurve"
|
||||
forLabel={t("ellipticCurve")}
|
||||
forID={t("common:helpLabel", { label: t("ellipticCurve") })}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Controller
|
||||
name="config.ecdsaEllipticCurveKey"
|
||||
control={form.control}
|
||||
defaultValue={["P-256"]}
|
||||
render={({ onChange, value }) => (
|
||||
<Select
|
||||
toggleId="kc-ecdsa-elliptic-curve"
|
||||
onToggle={(isExpanded) => setIsKeySizeDropdownOpen(isExpanded)}
|
||||
onSelect={(_, value) => {
|
||||
onChange([value.toString()]);
|
||||
setIsKeySizeDropdownOpen(false);
|
||||
}}
|
||||
selections={[value.toString()]}
|
||||
isOpen={isKeySizeDropdownOpen}
|
||||
variant={SelectVariant.single}
|
||||
aria-label={t("ellipticCurve")}
|
||||
data-testid="select-elliptic-curve-size"
|
||||
>
|
||||
{ecdsaEllipticCurveOptions?.map((item) => (
|
||||
<SelectOption
|
||||
selected={item === value}
|
||||
key={item}
|
||||
value={item}
|
||||
/>
|
||||
))}
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<ActionGroup className="kc-ecdsa-form-buttons">
|
||||
<Button
|
||||
className="kc-ecdsa-form-save-button"
|
||||
data-testid="add-provider-button"
|
||||
variant="primary"
|
||||
type="submit"
|
||||
>
|
||||
{t("common:save")}
|
||||
</Button>
|
||||
<Button
|
||||
className="kc-ecdsa-form-cancel-button"
|
||||
onClick={(!editMode && handleModalToggle) || undefined}
|
||||
variant="link"
|
||||
>
|
||||
{t("common:cancel")}
|
||||
</Button>
|
||||
</ActionGroup>
|
||||
</FormAccess>
|
||||
);
|
||||
};
|
||||
|
||||
export const ECDSAGeneratedSettings = () => {
|
||||
const { t } = useTranslation("realm-settings");
|
||||
const providerId = useRouteMatch<MatchParams>(
|
||||
"/:realm/realm-settings/keys/:id?/:providerType?/settings"
|
||||
)?.params.providerType;
|
||||
return (
|
||||
<>
|
||||
<ViewHeader titleKey={t("editProvider")} subKey={providerId} />
|
||||
<PageSection variant="light">
|
||||
<ECDSAGeneratedForm providerType={providerId} editMode />
|
||||
</PageSection>
|
||||
</>
|
||||
);
|
||||
};
|
|
@ -0,0 +1,36 @@
|
|||
import React from "react";
|
||||
import { Modal, ModalVariant } from "@patternfly/react-core";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ECDSAGeneratedForm } from "./ECDSAGeneratedForm";
|
||||
|
||||
type ECDSAGeneratedModalProps = {
|
||||
providerType: string;
|
||||
handleModalToggle: () => void;
|
||||
refresh: () => void;
|
||||
open: boolean;
|
||||
};
|
||||
|
||||
export const ECDSAGeneratedModal = ({
|
||||
providerType,
|
||||
handleModalToggle,
|
||||
open,
|
||||
refresh,
|
||||
}: ECDSAGeneratedModalProps) => {
|
||||
const { t } = useTranslation("realm-settings");
|
||||
|
||||
return (
|
||||
<Modal
|
||||
className="add-provider-modal"
|
||||
variant={ModalVariant.medium}
|
||||
title={t("addProvider")}
|
||||
isOpen={open}
|
||||
onClose={handleModalToggle}
|
||||
>
|
||||
<ECDSAGeneratedForm
|
||||
providerType={providerType}
|
||||
handleModalToggle={handleModalToggle}
|
||||
refresh={refresh}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
|
@ -38,6 +38,7 @@ import { AddOpenIdConnect } from "./identity-providers/add/AddOpenIdConnect";
|
|||
import { DetailSettings } from "./identity-providers/add/DetailSettings";
|
||||
import { AESGeneratedSettings } from "./realm-settings/key-providers/aes-generated/AESGeneratedForm";
|
||||
import { HMACGeneratedSettings } from "./realm-settings/key-providers/hmac-generated/HMACGeneratedForm";
|
||||
import { ECDSAGeneratedSettings } from "./realm-settings/key-providers/ecdsa-generated/ECDSAGeneratedForm";
|
||||
|
||||
export type RouteDef = BreadcrumbsRoute & {
|
||||
access: AccessType;
|
||||
|
@ -191,6 +192,12 @@ export const routes: RoutesFn = (t: TFunction) => [
|
|||
breadcrumb: t("realm-settings:editProvider"),
|
||||
access: "view-realm",
|
||||
},
|
||||
{
|
||||
path: "/:realm/realm-settings/keys/:id?/ecdsa-generated/settings",
|
||||
component: ECDSAGeneratedSettings,
|
||||
breadcrumb: t("realm-settings:editProvider"),
|
||||
access: "view-realm",
|
||||
},
|
||||
{
|
||||
path: "/:realm/realm-settings/keys/:id?/hmac-generated/settings",
|
||||
component: HMACGeneratedSettings,
|
||||
|
|
Loading…
Reference in a new issue