Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
33f5764
fix(security): enforce caller RBAC in API token webhook endpoint
claude Sep 1, 2026
4657d97
chore: address SonarCloud finding in GetAllApiTokensForWebhook
claude Sep 1, 2026
5566030
fix(security): don't leak more-privileged tokens to less-privileged c…
claude Sep 1, 2026
73b7d2a
chore: address SonarCloud param-grouping findings in ApiTokenRestHandler
claude Sep 1, 2026
ba2f3b9
fix(security): simplify to a straightforward super-admin gate
claude Sep 1, 2026
5d2c905
chore: address SonarCloud finding in super-admin gate check
claude Sep 1, 2026
e02f2be
Merge pull request #7016 from devtron-labs/fix/api-token-webhook-rbac…
Shivam-nagar23 Sep 1, 2026
5e5ebdc
feat: decouple app lifecycle actions; add indexes to improve CI query…
Shivam-nagar23 Sep 1, 2026
e3f0358
Merge branch 'main' into feat/dev-admin-app-lifecycle
Shivam-nagar23 Sep 2, 2026
4b2bf38
fix(user): scope filter-based bulk delete to match listing filters
claude Sep 4, 2026
418ccc7
Merge pull request #7019 from devtron-labs/feat/dev-admin-app-lifecycle
Shivam-nagar23 Sep 7, 2026
a514e03
Merge branch 'main' into fix/bulk-delete-filter-scope
Shivam-nagar23 Sep 7, 2026
5916f39
Merge pull request #7021 from devtron-labs/fix/bulk-delete-filter-scope
Shivam-nagar23 Sep 7, 2026
1679300
feat: resolve RBAC inconsistencies for helm apps with unique identifiers
Shivam-nagar23 Sep 11, 2026
81c8bcf
Conditions saved with the plugin definition (plugin_step_condition) a…
prakash100198 Sep 14, 2026
a463577
Merge pull request #7034 from devtron-labs/fix-link-app-rbac
Shivam-nagar23 Sep 15, 2026
36dc113
Merge branch 'main' into support-trigger-conditions-pipeline-level-oss
prakash100198 Sep 15, 2026
72dcd49
Merge pull request #7035 from devtron-labs/support-trigger-conditions…
prakash100198 Sep 15, 2026
bbb3ec7
feat: RBAC support for external argo/flux apps (#7014)
vivekanandan-devtron Sep 16, 2026
5e957a5
chore: update devtron-services deps to main for v0.47.0
Shivam-nagar23 Sep 21, 2026
9097ff6
Merge pull request #7044 from devtron-labs/chore/dep-update-rc-v0.47.0
Shivam-nagar23 Sep 21, 2026
2026102
Merge remote-tracking branch 'origin/main' into chore/sync-main-into-…
Shivam-nagar23 Sep 21, 2026
c83900e
chore(sql): resolve migration 36504600 collision and make argo/flux r…
Shivam-nagar23 Sep 21, 2026
fed83da
Merge pull request #7046 from devtron-labs/chore/sync-main-into-rc-v0…
Shivam-nagar23 Sep 21, 2026
50fa81b
Merge pull request #7045 from devtron-labs/release-candidate-v0.47.0
Shivam-nagar23 Sep 21, 2026
c24e9d8
fix: apply Hibernating app-status filter in SQL instead of after pagi…
Shivam-nagar23 Sep 22, 2026
6ab8595
Merge pull request #7049 from devtron-labs/fix/hibernating-filter-pag…
Shivam-nagar23 Sep 22, 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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ replace (
// Keep the left side unversioned: a versioned LHS stops matching whenever the
// require line is bumped, which silently un-pins this and breaks the linux build.
github.com/cyphar/filepath-securejoin => github.com/cyphar/filepath-securejoin v0.3.6 // indirect
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20260803100101-66fcb35e4b0e
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260803100101-66fcb35e4b0e
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20260921111017-f0b3fba15081
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260921111017-f0b3fba15081
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc h1:VRRKCwnzq
github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/devtron-labs/argo-workflows/v3 v3.5.13 h1:3pINq0gXOSeTw2z/vYe+j80lRpSN5Rp/8mfQORh8SmU=
github.com/devtron-labs/argo-workflows/v3 v3.5.13/go.mod h1:/vqxcovDPT4zqr4DjR5v7CF8ggpY1l3TSa2CIG3jmjA=
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20260803100101-66fcb35e4b0e h1:mfAbqKv+CswkCah0JCSzeTJThvjaNBt51TunM8lBsPU=
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20260803100101-66fcb35e4b0e/go.mod h1:m/dMed6iiZQ/4iOJ6kIVWXQ+T71rJjU7DnCr9RcYh1w=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260803100101-66fcb35e4b0e h1:gh/iIVC9FNpPE8C72duWZGNgwgE2jrYonpYDvty2cFM=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260803100101-66fcb35e4b0e/go.mod h1:QZfnuGy0xqrYWhq3jCRe6fDDwIsrpbjAR2PXNrh0su8=
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20260921111017-f0b3fba15081 h1:BPkaewVaxMTnIAHcxwsWgebl5GV7uc6R/a0tCBoTZn0=
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20260921111017-f0b3fba15081/go.mod h1:m/dMed6iiZQ/4iOJ6kIVWXQ+T71rJjU7DnCr9RcYh1w=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260921111017-f0b3fba15081 h1:niegDwFaPhH5b+7UP2QuGdR6rB43hFYqNY1pJ6ZbXQw=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260921111017-f0b3fba15081/go.mod h1:QZfnuGy0xqrYWhq3jCRe6fDDwIsrpbjAR2PXNrh0su8=
github.com/devtron-labs/go-bitbucket v0.9.60-beta h1:VEx1jvDgdtDPS6A1uUFoaEi0l1/oLhbr+90xOwr6sDU=
github.com/devtron-labs/go-bitbucket v0.9.60-beta/go.mod h1:GnuiCesvh8xyHeMCb+twm8lBR/kQzJYSKL28ZfObp1Y=
github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e h1:U6UdYbW8a7xn5IzFPd8cywjVVPfutGJCudjePAfL/Hs=
Expand Down
42 changes: 11 additions & 31 deletions pkg/app/AppListingService.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"context"
"fmt"
"github.com/devtron-labs/devtron/api/bean/AppView"
bean2 "github.com/devtron-labs/devtron/client/argocdServer/bean"
"github.com/devtron-labs/devtron/internal/middleware"
"github.com/devtron-labs/devtron/internal/sql/repository/app"
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig/bean/workflow/cdWorkflow"
Expand Down Expand Up @@ -438,16 +437,17 @@ func (impl AppListingServiceImpl) FetchAppsByEnvironmentV2(fetchAppListingReques
return []*AppView.AppEnvironmentContainer{}, 0, nil
}

// Currently AppStatus is available in Db for only ArgoApps
// We fetch AppStatus on the fly for Helm Apps from scoop, So AppStatus filter will be applied in last
// fun to check if "HIBERNATING" exists in fetchAppListingRequest.AppStatuses
isFilteredOnHibernatingStatus := impl.isFilteredOnHibernatingStatus(fetchAppListingRequest)
// remove ""HIBERNATING" from fetchAppListingRequest.AppStatuses
appStatusesFilter := make([]string, 0)
if isFilteredOnHibernatingStatus {
appStatusesFilter = fetchAppListingRequest.AppStatuses
fetchAppListingRequest.AppStatuses = []string{}
}
// NOTE on "HIBERNATING": it is an ordinary value persisted in app_status.status
// (appStatus.UpdateStatusWithAppIdEnvId normalises Suspended/Hibernated to it), so it is
// filterable in SQL exactly like every other app status and is applied below, before
// LIMIT/OFFSET, by buildAppListingWhereCondition.
//
// TODO (helm pipelines): Helm-type (non-GitOps) CD pipelines never get an app_status row --
// their status is only known by querying the running release. So a hibernated helm-pipeline
// app cannot be matched by this filter today. The fix is to persist their status into
// app_status from the status-sync worker (after which the predicate below covers them for
// free), NOT to fan out live status calls during a list request -- that is what
// updateAppStatusForHelmTypePipelines did and it was removed from this path for slowness.

appListingFilter := helper.AppListingFilter{
Environments: fetchAppListingRequest.Environments,
Expand Down Expand Up @@ -506,29 +506,9 @@ func (impl AppListingServiceImpl) FetchAppsByEnvironmentV2(fetchAppListingReques
impl.Logger.Errorw("error, UpdateAppStatusForHelmTypePipelines", "envIds", envIds, "err", err)
}

// apply filter for "HIBERNATING" status
if isFilteredOnHibernatingStatus {
filteredContainers := make([]*AppView.AppEnvironmentContainer, 0)
for _, container := range envContainers {
if slices.Contains(appStatusesFilter, container.AppStatus) {
filteredContainers = append(filteredContainers, container)
}
}
envContainers = filteredContainers
appSize = len(filteredContainers)
}
return envContainers, appSize, nil
}

func (impl AppListingServiceImpl) isFilteredOnHibernatingStatus(fetchAppListingRequest FetchAppListingRequest) bool {
if fetchAppListingRequest.AppStatuses != nil && len(fetchAppListingRequest.AppStatuses) > 0 {
if slices.Contains(fetchAppListingRequest.AppStatuses, bean2.HIBERNATING) {
return true
}
}
return false
}

func (impl AppListingServiceImpl) ISLastReleaseStopType(appId, envId int) (bool, error) {
override, err := impl.pipelineOverrideRepository.GetLatestRelease(appId, envId)
if err != nil && !util.IsErrNoRows(err) {
Expand Down
6 changes: 4 additions & 2 deletions scripts/sql/36804600_argo_flux_rbac.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ VALUES
"act": { "value": "get", "indexKeyMap": {} },
"obj": { "value": "%", "indexKeyMap": { "0": "EnvObj" } } }
]
}','now()','1','now()','1',true,false);
}','now()','1','now()','1',true,false)
ON CONFLICT ("entity", "access_type", "role") DO NOTHING;

INSERT INTO "public"."rbac_role_data"
("entity","access_type","role","role_display_name","role_description","role_data",
Expand Down Expand Up @@ -108,4 +109,5 @@ VALUES
"action": { "value": "admin", "indexKeyMap": {} },
"entity": { "value": "%", "indexKeyMap": { "0": "Entity" } },
"accessType": { "value": "flux-app", "indexKeyMap": {} }
}','now()','1','now()','1',true,false);
}','now()','1','now()','1',true,false)
ON CONFLICT ("entity", "access_type", "role") DO NOTHING;
8 changes: 4 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -523,15 +523,15 @@ github.com/davecgh/go-spew/spew
# github.com/deckarep/golang-set v1.8.0
## explicit; go 1.17
github.com/deckarep/golang-set
# github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20260803100101-66fcb35e4b0e
# github.com/devtron-labs/authenticator v0.4.35-0.20240809073103-6e11da8083f8 => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20260921111017-f0b3fba15081
## explicit; go 1.25.0
github.com/devtron-labs/authenticator/apiToken
github.com/devtron-labs/authenticator/client
github.com/devtron-labs/authenticator/jwt
github.com/devtron-labs/authenticator/middleware
github.com/devtron-labs/authenticator/oidc
github.com/devtron-labs/authenticator/password
# github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260803100101-66fcb35e4b0e
# github.com/devtron-labs/common-lib v0.18.1-0.20241001061923-eda545dc839e => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260921111017-f0b3fba15081
## explicit; go 1.25.0
github.com/devtron-labs/common-lib/async
github.com/devtron-labs/common-lib/blob-storage
Expand Down Expand Up @@ -2697,5 +2697,5 @@ xorm.io/xorm/names
xorm.io/xorm/schemas
xorm.io/xorm/tags
# github.com/cyphar/filepath-securejoin => github.com/cyphar/filepath-securejoin v0.3.6
# github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20260803100101-66fcb35e4b0e
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260803100101-66fcb35e4b0e
# github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20260921111017-f0b3fba15081
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260921111017-f0b3fba15081
Loading