Skip to content

feat: secrets management admin UI #105953

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

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
0c00291
feat: secret management draft ui
w1kman Feb 11, 2025
e6f9897
feat: secret management draft ui
w1kman Feb 11, 2025
ace8519
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Feb 12, 2025
fc79679
fix: optimistic update of local store
w1kman Feb 19, 2025
a040d19
fix: optimistic update of local store
w1kman Feb 19, 2025
956df8a
fix: copy button paddings and margins
w1kman Feb 19, 2025
aa3b2ff
fix: copy button paddings and margins
w1kman Feb 19, 2025
ac58054
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Feb 19, 2025
330935c
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Feb 19, 2025
6f3ba7f
fix: update external resource spec
w1kman Feb 19, 2025
c35c300
fix: update external resource spec
w1kman Feb 19, 2025
fc5ef77
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Mar 3, 2025
3d288b6
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Mar 3, 2025
1540179
add allowed list of descrypters
w1kman Mar 3, 2025
aaaf860
add allowed list of descrypters
w1kman Mar 3, 2025
b665671
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Mar 4, 2025
15c8e7a
SecretsManagement: update allowed decrypters constant (and default ke…
macabu Mar 17, 2025
d89a140
Merge remote-tracking branch 'origin/w1kman/secrets-management-admin-…
w1kman Mar 24, 2025
8936f50
fix: build issues
w1kman Mar 24, 2025
7f11f26
update ui to handle label/value for decrypters
w1kman Mar 24, 2025
a49523e
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Apr 2, 2025
e3b2c27
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman May 14, 2025
095b7b7
migrate to RTK query (wip)
w1kman May 15, 2025
aa424ba
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman May 15, 2025
ab77457
refactor/update secrets management
w1kman May 15, 2025
d7d985c
add labels to secret form
w1kman May 21, 2025
8907ad3
add util function for invalid field detection
w1kman May 21, 2025
2e4c03e
update breakpoint for wrap detection
w1kman May 22, 2025
8420d6d
SecureValues: Update decrypter format to get rid of actor_ prefix (#1…
macabu May 22, 2025
5c03e13
update translation for secrets and add tests
w1kman May 22, 2025
cf27992
Merge remote-tracking branch 'origin/w1kman/secrets-management-admin-…
w1kman May 22, 2025
96fef80
update translation for secrets and add tests
w1kman May 22, 2025
3ba1f14
fix relative imports for `app/core/internationalization`
w1kman Jun 2, 2025
e811f25
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Jun 2, 2025
b8a9545
use `t` and `Trans` from `@grafana/i18n`
w1kman Jun 2, 2025
f9233f5
fix eslint error
w1kman Jun 4, 2025
9067f28
improve error handling
w1kman Jun 4, 2025
59365d2
improve error handling
w1kman Jun 4, 2025
f134eaf
change date format and add modified
w1kman Jun 5, 2025
38df06b
internally rename `audiences` to `decrypters`
w1kman Jun 5, 2025
8619b86
add additional tests
w1kman Jun 9, 2025
aa86e81
add additional tests
w1kman Jun 9, 2025
49f45e2
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Jun 9, 2025
477e1be
generate translations
w1kman Jun 9, 2025
9980a20
fix `betterer` issues and style guide issues
w1kman Jun 11, 2025
01a4140
fix prettier issue
w1kman Jun 11, 2025
f3cbc89
fix `name` issue when creating and updating.
w1kman Jun 18, 2025
819af68
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Jun 18, 2025
f526244
fix updated translation usage.
w1kman Jun 18, 2025
068ca60
fix updated translation usage (remove dependency @grafana/i18n/intern…
w1kman Jun 18, 2025
9f93dbd
Merge branch 'secret-service/feature-branch' into w1kman/secrets-mana…
w1kman Jun 24, 2025
efd4d92
fix change requests
w1kman Jun 24, 2025
ee13e25
Merge remote-tracking branch 'origin/secret-service/feature-branch' i…
dana-axinte Jun 25, 2025
c7458c7
Merge remote-tracking branch 'origin/secret-service/feature-branch' i…
dana-axinte Jun 25, 2025
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
Prev Previous commit
Next Next commit
add allowed list of descrypters
- Also removed the possibility to enter custom values.
  • Loading branch information
w1kman committed Mar 3, 2025
commit 1540179a1b4221bfd644f07d9e7b016bd80e46bc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Controller, useForm } from 'react-hook-form';

import { Button, Field, Input, MultiSelect, RadioButtonGroup, Stack } from '@grafana/ui';

import { MOCKED_SECRET_AUDIENCES } from '../constants';
import { ALLOWED_SECRET_DECRYPTERS } from '../constants';

import { SecretInput } from './SecretInput';

Expand Down Expand Up @@ -32,7 +32,7 @@ export function SecretForm({
disableNameField = false,
}: BaseSecretFormProps) {
const audiences = [
...MOCKED_SECRET_AUDIENCES.map((audience) => ({ label: audience, value: audience })),
...ALLOWED_SECRET_DECRYPTERS.map((audience) => ({ label: audience, value: audience })),
...(initialValues?.audiences ?? []),
];

Expand Down Expand Up @@ -102,7 +102,9 @@ export function SecretForm({
<Controller
control={control}
name="audiences"
render={({ field: { ref, ...field } }) => <MultiSelect allowCustomValue options={audiences} {...field} />}
render={({ field: { ref, ...field } }) => (
<MultiSelect placeholder="Choose decrypter(s)" options={audiences} {...field} />
)}
/>
</Field>
<Stack gap={1} justifyContent="flex-end">
Expand Down
10 changes: 5 additions & 5 deletions public/app/features/secrets-management/constants.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// As per pkg/tests/secret/testdata/secure-value-xyz.yaml
export const MOCKED_SECRET_AUDIENCES = [
'k6.grafana.app/app-name-1',
'k6.grafana.app/app-name-2',
'entity.grafana.app/*',
// @see https://github.com/grafana/grafana-enterprise/blob/secret-service/feature-branch/src/pkg/extensions/secret/decrypt/allow_list.go
export const ALLOWED_SECRET_DECRYPTERS = [
'k6.grafana.app/secret-decrypter-thing',
'synthetic-monitoring.grafana.app/secret-decrypter-thing',
];

export const MOCKED_SECRET_KEEPER = 'my-keeper-1';

export const MOCKED_FILTER_OPTIONS = [
Expand Down