netbox-secrets 3.0.0__tar.gz → 3.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. {netbox_secrets-3.0.0/netbox_secrets.egg-info → netbox_secrets-3.0.2}/PKG-INFO +1 -1
  2. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/api/views.py +40 -0
  3. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/graphql/filters.py +3 -3
  4. netbox_secrets-3.0.2/netbox_secrets/migrations/0011_remove_redundant_indexes.py +25 -0
  5. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/models/keys.py +0 -3
  6. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/models/secrets.py +0 -2
  7. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2/netbox_secrets.egg-info}/PKG-INFO +1 -1
  8. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets.egg-info/SOURCES.txt +1 -0
  9. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/setup.py +1 -1
  10. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/LICENSE.md +0 -0
  11. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/MANIFEST.in +0 -0
  12. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/README.md +0 -0
  13. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/__init__.py +0 -0
  14. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/api/__init__.py +0 -0
  15. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/api/serializers.py +0 -0
  16. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/api/serializers_/__init__.py +0 -0
  17. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/api/serializers_/keys.py +0 -0
  18. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/api/serializers_/nested.py +0 -0
  19. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/api/serializers_/secrets.py +0 -0
  20. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/api/urls.py +0 -0
  21. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/constants.py +0 -0
  22. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/exceptions.py +0 -0
  23. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/filtersets.py +0 -0
  24. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/forms/__init__.py +0 -0
  25. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/forms/bulk_edit.py +0 -0
  26. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/forms/bulk_import.py +0 -0
  27. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/forms/filterset.py +0 -0
  28. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/forms/model_forms.py +0 -0
  29. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/graphql/__init__.py +0 -0
  30. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/graphql/schema.py +0 -0
  31. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/graphql/types.py +0 -0
  32. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/hashers.py +0 -0
  33. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/0001_initial.py +0 -0
  34. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/0002_populate_userkeys.py +0 -0
  35. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/0003_populate_secretroles.py +0 -0
  36. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/0004_populate_secrets.py +0 -0
  37. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/0005_alter_secret_custom_field_data_and_more.py +0 -0
  38. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/0006_alter_userkey_created_alter_userkey_last_updated.py +0 -0
  39. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/0007_secret__object_repr_secret_comments_and_more.py +0 -0
  40. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/0008_userkey_custom_field_data_userkey_tags.py +0 -0
  41. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/0009_secret_owner_secretrole_level_secretrole_lft_and_more.py +0 -0
  42. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/0010_secret_role_rebuild.py +0 -0
  43. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/migrations/__init__.py +0 -0
  44. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/models/__init__.py +0 -0
  45. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/navigation.py +0 -0
  46. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/querysets.py +0 -0
  47. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/signals.py +0 -0
  48. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/tables.py +0 -0
  49. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/template_content.py +0 -0
  50. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/activate_keys.html +0 -0
  51. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/inc/private_key_modal.html +0 -0
  52. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/inc/secret_actions.html +0 -0
  53. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/inc/secret_add_button.html +0 -0
  54. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/inc/secrets_inline_js.html +0 -0
  55. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/inc/secrets_panel.html +0 -0
  56. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/secret.html +0 -0
  57. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/secret_edit.html +0 -0
  58. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/secretrole.html +0 -0
  59. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/userkey.html +0 -0
  60. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/userkey_edit.html +0 -0
  61. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/templates/netbox_secrets/userkey_list.html +0 -0
  62. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/tests/__init__.py +0 -0
  63. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/tests/constants.py +0 -0
  64. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/tests/test_api.py +0 -0
  65. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/tests/test_filters.py +0 -0
  66. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/tests/test_forms.py +0 -0
  67. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/tests/test_models.py +0 -0
  68. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/tests/test_signals.py +0 -0
  69. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/tests/test_utils.py +0 -0
  70. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/tests/test_views.py +0 -0
  71. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/urls.py +0 -0
  72. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/utils/__init__.py +0 -0
  73. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/utils/crypto.py +0 -0
  74. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/utils/hashers.py +0 -0
  75. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/utils/helpers.py +0 -0
  76. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets/views.py +0 -0
  77. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets.egg-info/dependency_links.txt +0 -0
  78. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets.egg-info/not-zip-safe +0 -0
  79. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets.egg-info/requires.txt +0 -0
  80. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/netbox_secrets.egg-info/top_level.txt +0 -0
  81. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/pyproject.toml +0 -0
  82. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/requirements.txt +0 -0
  83. {netbox_secrets-3.0.0 → netbox_secrets-3.0.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: netbox-secrets
3
- Version: 3.0.0
3
+ Version: 3.0.2
4
4
  Summary: Enhance your secret management with encrypted storage and flexible, user-friendly features.
5
5
  Home-page: https://github.com/Onemind-Services-LLC/netbox-secrets/
6
6
  Author: Abhimanyu Saharan
@@ -725,6 +725,46 @@ class LegacyActivateUserKeyViewSet(ViewSet):
725
725
  permission_classes = [IsAuthenticated]
726
726
  serializer_class = serializers.ActivateUserKeySerializer
727
727
 
728
+ @extend_schema(
729
+ request=serializers.ActivateUserKeySerializer,
730
+ responses={
731
+ 200: OpenApiResponse(
732
+ response=OpenApiTypes.STR,
733
+ description="Plain-text success message.",
734
+ examples=[
735
+ OpenApiExample(
736
+ "Success",
737
+ value="Successfully activated 2 user keys.",
738
+ )
739
+ ],
740
+ ),
741
+ 400: OpenApiResponse(
742
+ description="Bad request or validation error.",
743
+ response=OpenApiTypes.OBJECT,
744
+ examples=[
745
+ OpenApiExample(
746
+ "Validation error",
747
+ value={"user_key_ids": ["This field is required."]},
748
+ ),
749
+ OpenApiExample(
750
+ "Legacy error message",
751
+ value={"detail": ERR_NO_KEYS_PROVIDED},
752
+ ),
753
+ ],
754
+ ),
755
+ 403: OpenApiResponse(
756
+ response=OpenApiTypes.STR,
757
+ description="Permission denied.",
758
+ examples=[
759
+ OpenApiExample(
760
+ "Permission denied",
761
+ value="You do not have permission to active User Keys.",
762
+ )
763
+ ],
764
+ ),
765
+ },
766
+ deprecated=True,
767
+ )
728
768
  def create(self, request):
729
769
  """
730
770
  Activate one or more user keys using the caller's private key.
@@ -3,7 +3,7 @@ from typing import Annotated, TYPE_CHECKING
3
3
  import strawberry
4
4
  import strawberry_django
5
5
  from strawberry.scalars import ID
6
- from strawberry_django import FilterLookup
6
+ from strawberry_django import StrFilterLookup
7
7
 
8
8
  from netbox.graphql.filters import (
9
9
  OrganizationalModelFilter,
@@ -36,8 +36,8 @@ class SecretRoleFilter(OrganizationalModelFilter):
36
36
 
37
37
 
38
38
  @strawberry_django.filter_type(Secret, lookups=True)
39
- class SecretFilter(ContactFilterMixin, PrimaryModelFilter):
40
- name: FilterLookup[str] | None = strawberry_django.filter_field()
39
+ class SecretFilter(PrimaryModelFilter, ContactFilterMixin):
40
+ name: StrFilterLookup[str] | None = strawberry_django.filter_field()
41
41
  role: Annotated[
42
42
  'SecretRoleFilter', strawberry.lazy('netbox_secrets.graphql.filters')
43
43
  ] | None = strawberry_django.filter_field()
@@ -0,0 +1,25 @@
1
+ # Generated by Django 5.2.10 on 2026-05-04
2
+
3
+ from django.db import migrations
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+
8
+ dependencies = [
9
+ ('netbox_secrets', '0010_secret_role_rebuild'),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.RemoveIndex(
14
+ model_name='secret',
15
+ name='netbox_secr_role_id_258ca2_idx',
16
+ ),
17
+ migrations.RemoveIndex(
18
+ model_name='secret',
19
+ name='netbox_secr__object_2efed1_idx',
20
+ ),
21
+ migrations.RemoveIndex(
22
+ model_name='userkey',
23
+ name='netbox_secr_user_id_2a9e10_idx',
24
+ ),
25
+ ]
@@ -71,9 +71,6 @@ class UserKey(NetBoxModel):
71
71
  ordering = ['user__username']
72
72
  verbose_name = _('User Key')
73
73
  verbose_name_plural = _('User Keys')
74
- indexes = [
75
- models.Index(fields=['user']),
76
- ]
77
74
 
78
75
  def __init__(self, *args, **kwargs):
79
76
  super().__init__(*args, **kwargs)
@@ -138,8 +138,6 @@ class Secret(PrimaryModel, ContactsMixin):
138
138
  verbose_name_plural = _('Secrets')
139
139
  indexes = [
140
140
  models.Index(fields=['assigned_object_type', 'assigned_object_id']),
141
- models.Index(fields=['role']),
142
- models.Index(fields=['_object_repr']),
143
141
  ]
144
142
 
145
143
  def __init__(self, *args, **kwargs):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: netbox-secrets
3
- Version: 3.0.0
3
+ Version: 3.0.2
4
4
  Summary: Enhance your secret management with encrypted storage and flexible, user-friendly features.
5
5
  Home-page: https://github.com/Onemind-Services-LLC/netbox-secrets/
6
6
  Author: Abhimanyu Saharan
@@ -49,6 +49,7 @@ netbox_secrets/migrations/0007_secret__object_repr_secret_comments_and_more.py
49
49
  netbox_secrets/migrations/0008_userkey_custom_field_data_userkey_tags.py
50
50
  netbox_secrets/migrations/0009_secret_owner_secretrole_level_secretrole_lft_and_more.py
51
51
  netbox_secrets/migrations/0010_secret_role_rebuild.py
52
+ netbox_secrets/migrations/0011_remove_redundant_indexes.py
52
53
  netbox_secrets/migrations/__init__.py
53
54
  netbox_secrets/models/__init__.py
54
55
  netbox_secrets/models/keys.py
@@ -33,7 +33,7 @@ def read_requirements(path: str) -> list[str]:
33
33
 
34
34
  setup(
35
35
  name='netbox-secrets',
36
- version='3.0.0',
36
+ version='3.0.2',
37
37
  description=description,
38
38
  long_description=long_description,
39
39
  long_description_content_type="text/markdown",
File without changes
File without changes