Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d610ea3
chore: remove unused GraphQL queries and mutations for app keys and a…
nimish-ks Feb 7, 2026
5130203
chore: remove KMSLogs component and associated logic
nimish-ks Feb 7, 2026
90a25a6
fix: update warning message in DeleteAppDialog to clarify data recove…
nimish-ks Feb 7, 2026
56aed1d
fix: handle potential null values in service accounts rendering in Ap…
nimish-ks Feb 7, 2026
88cf596
chore: simplify Logs component by removing KMSLogs and associated tab…
nimish-ks Feb 7, 2026
b44d869
refactor: streamline Tokens component by removing unused queries, mut…
nimish-ks Feb 7, 2026
f6ab4db
chore: remove unused GraphQL queries and types related to KMS logs an…
nimish-ks Feb 7, 2026
9df7599
chore: rename project from 'dashboard' to 'console' and update packag…
nimish-ks Feb 7, 2026
b55d2a8
chore: update backend dependencies by removing unused packages and ad…
nimish-ks Feb 7, 2026
2546de1
refactor: remove unused save method in App model and related cloud ho…
nimish-ks Feb 7, 2026
c768c5b
chore: remove KMS view and associated logic from backend API
nimish-ks Feb 7, 2026
1797927
chore: eliminate KMS logs and app activity chart logic from backend s…
nimish-ks Feb 7, 2026
3bed938
chore: remove unused DynamoDB and Cloudflare configurations from back…
nimish-ks Feb 7, 2026
a9f9b75
chore: remove KMS endpoint from cloud URLs in backend routing
nimish-ks Feb 7, 2026
31b53b9
chore: remove Cloudflare KV storage logic from backend API
nimish-ks Feb 7, 2026
ee9eca6
chore: remove KMSLogType and related classes from backend GraphQL schema
nimish-ks Feb 7, 2026
29c4167
chore: remove RotateAppKeysMutation and related Cloudflare KV logic f…
nimish-ks Feb 7, 2026
8c876e9
chore: remove admin interface for KMSLog from backend logs
nimish-ks Feb 7, 2026
72c5048
style: standardize string quotes in LogsConfig class in backend logs
nimish-ks Feb 7, 2026
860eb2b
chore: delete unused views file from backend logs
nimish-ks Feb 7, 2026
82636c4
chore: delete DynamoDB models for KMSLog from backend logs
nimish-ks Feb 7, 2026
1298878
chore: remove KMSDBLog model from backend logs, retaining migrations …
nimish-ks Feb 7, 2026
82282db
chore: delete queries.py file for KMSLog from backend logs
nimish-ks Feb 7, 2026
4c13470
chore: delete tests.py file from backend logs
nimish-ks Feb 7, 2026
c09be75
chore: delete KMSDBLog model from backend logs migrations
nimish-ks Feb 7, 2026
98c9d25
merge: resolve conflicts with org ownership transfer feature
nimish-ks Feb 8, 2026
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
15 changes: 0 additions & 15 deletions backend/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
PermissionsMixin,
)
from uuid import uuid4
from backend.api.kv import write
import json
from django.utils import timezone
from django.conf import settings
from api.services import Providers, ServiceConfig
from api.tasks.syncing import trigger_sync_tasks
from backend.quotas import (
Expand All @@ -19,7 +16,6 @@
)
from django.core.exceptions import ValidationError

CLOUD_HOSTED = settings.APP_HOST == "cloud"


class CustomUserManager(BaseUserManager):
Expand Down Expand Up @@ -156,17 +152,6 @@ class App(models.Model):

objects = AppManager()

def save(self, *args, **kwargs):
super().save(*args, **kwargs) # Call the "real" save() method.
if CLOUD_HOSTED:
key = self.app_token
value = self.wrapped_key_share
meta = {"appId": self.id, "appName": self.name, "live": True}
try:
write(key, value, json.dumps(meta))
except:
pass

def __str__(self):
return self.name

Expand Down
41 changes: 0 additions & 41 deletions backend/api/views/kms.py

This file was deleted.

85 changes: 0 additions & 85 deletions backend/backend/api/kv.py

This file was deleted.

51 changes: 0 additions & 51 deletions backend/backend/graphene/mutations/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from backend.api.kv import delete, purge
from backend.graphene.mutations.environment import EnvironmentKeyInput
from api.utils.access.permissions import (
user_can_access_app,
Expand All @@ -16,11 +15,8 @@
ServiceAccount,
)
from backend.graphene.types import AppType, MemberType
from django.conf import settings
from django.db.models import Q

CLOUD_HOSTED = settings.APP_HOST == "cloud"


class CreateAppMutation(graphene.Mutation):
class Arguments:
Expand Down Expand Up @@ -88,41 +84,6 @@ def mutate(
return CreateAppMutation(app=app)


class RotateAppKeysMutation(graphene.Mutation):
class Arguments:
id = graphene.ID(required=True)
app_token = graphene.String(required=True)
wrapped_key_share = graphene.String(required=True)

app = graphene.Field(AppType)

@classmethod
def mutate(cls, root, info, id, app_token, wrapped_key_share):
user = info.context.user
app = App.objects.get(id=id)

if not user_can_access_app(user.userId, app.id):
raise GraphQLError("You don't have access to this app")

if CLOUD_HOSTED:
# delete current keys from cloudflare KV
deleted = delete(app.app_token)

# purge keys from cloudflare cache
purged = purge(
f"phApp:v{app.app_version}:{app.identity_key}/{app.app_token}"
)

if not deleted or not purged:
raise GraphQLError("Failed to delete app keys. Please try again.")

app.app_token = app_token
app.wrapped_key_share = wrapped_key_share
app.save()

return RotateAppKeysMutation(app=app)


class UpdateAppNameMutation(graphene.Mutation):
class Arguments:
id = graphene.ID(required=True)
Expand Down Expand Up @@ -176,18 +137,6 @@ def mutate(cls, root, info, id):
):
raise GraphQLError("You don't have permission to delete Apps")

if CLOUD_HOSTED:
# delete current keys from cloudflare KV
deleted = delete(app.app_token)

# purge keys from cloudflare cache
purged = purge(
f"phApp:v{app.app_version}:{app.identity_key}/{app.app_token}"
)

if not deleted or not purged:
raise GraphQLError("Failed to delete app keys. Please try again.")

app.wrapped_key_share = ""
app.save()
app.delete()
Expand Down
57 changes: 0 additions & 57 deletions backend/backend/graphene/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from ee.integrations.secrets.dynamic.graphene.types import DynamicSecretType
from backend.quotas import PLAN_CONFIG
import graphene
from enum import Enum
from graphene import ObjectType, relay, NonNull
from graphene_django import DjangoObjectType
from api.models import (
Expand Down Expand Up @@ -40,7 +39,6 @@
UserToken,
Identity,
)
from logs.dynamodb_models import KMSLog
from django.utils import timezone
from api.utils.access.roles import default_roles
from graphql import GraphQLError
Expand Down Expand Up @@ -906,61 +904,6 @@ class Meta:
fields = ("id", "name", "color")


class KMSLogType(ObjectType):
class Meta:
model = KMSLog
fields = (
"id",
"app_id",
"timestamp",
"phase_node",
"event_type",
"ip_address",
"ph_size",
"edge_location",
"country",
"city",
"latitude",
"longitude",
)
interfaces = (relay.Node,)

id = graphene.ID(required=True)
timestamp = graphene.BigInt()
app_id = graphene.String()
phase_node = graphene.String()
event_type = graphene.String()
ip_address = graphene.String()
ph_size = graphene.Int()
asn = graphene.Int()
isp = graphene.String()
edge_location = graphene.String()
country = graphene.String()
city = graphene.String()
latitude = graphene.Float()
longitude = graphene.Float()


class ChartDataPointType(graphene.ObjectType):
index = graphene.Int()
date = graphene.BigInt()
data = graphene.Int()


class TimeRange(Enum):
HOUR = "hour"
DAY = "day"
WEEK = "week"
MONTH = "month"
YEAR = "year"
ALL_TIME = "allTime"


class KMSLogsResponseType(ObjectType):
logs = graphene.List(KMSLogType)
count = graphene.Int()


class SecretLogsResponseType(ObjectType):
logs = graphene.List(SecretEventType)
count = graphene.Int()
Expand Down
Loading