Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
c176e53
Referring xconfwebconfig develop to xconfadmin develop
gravi21 Jul 16, 2025
510e364
Refactor connector methods of GroupService to make it testable
gravi21 Jul 16, 2025
6638a98
update go.mod
gravi21 Jul 16, 2025
c860b3f
Merge pull request #12 from rdkcentral/refer_develop_xconfwebconfig
gravi21 Jul 16, 2025
7ab613d
Referencing github path for xconfadmin
gravi21 Jul 16, 2025
199ea04
Updated go.mod with github path
gravi21 Jul 16, 2025
8d40147
update go.mod
gravi21 Jul 16, 2025
981f311
Merge pull request #13 from rdkcentral/update_module
gravi21 Jul 16, 2025
24ed898
Updated Makefile
gravi21 Jul 17, 2025
56a243a
Merge pull request #15 from rdkcentral/update_makefile
gravi21 Jul 17, 2025
ff6d61b
Reverting older fixes for Regression
gravi21 Jul 18, 2025
ff95a9a
Readding some empty data fixes
gravi21 Jul 18, 2025
8d24f17
Merge pull request #16 from rdkcentral/revert_olderfix
gravi21 Jul 18, 2025
96dcf72
Fix build version and update go.mod to use latest version of xconfweb…
pt-nguyen Jul 21, 2025
4479a4a
Update makefile
gravi21 Jul 22, 2025
9b62c1a
Merge pull request #19 from rdkcentral/gopi_new_develop
gravi21 Jul 22, 2025
459df89
Merge remote-tracking branch 'origin/develop' into phuong-dev
pt-nguyen Jul 25, 2025
f3e00a9
Update go.mod to use latest version of xconfwebconfig
pt-nguyen Jul 25, 2025
421be11
Merge pull request #17 from rdkcentral/phuong-dev
gravi21 Jul 25, 2025
f8b02d8
XDPXCONF-1401: wakeuppool api creation changes
gravi21 Aug 6, 2025
74caf64
api to create wakeuppoolgroup , removewakeup tag
gravi21 Aug 8, 2025
780c54e
refactor: update wakeup pool tag naming convention for consistency an…
bhushan-mdn Aug 13, 2025
8f50d47
Removed the removeTag code since we have are handling in Canarymgr
gravi21 Aug 13, 2025
48bb5b4
Addressing Review Comments
gravi21 Aug 14, 2025
08f2b5a
Merge pull request #22 from rdkcentral/gopi_dev
gravi21 Aug 18, 2025
f74d5d9
refactor: enhance CreateWakeupPoolList to accept force parameter and …
bhushan-mdn Aug 28, 2025
17dc2ad
Merge pull request #24 from rdkcentral/dev_XDPXCONF-1523
bhushan-mdn Sep 1, 2025
afa252d
Improved error logging and seperated validation according to the flag
vishnuajayccst Sep 1, 2025
7ac820d
Merge pull request #25 from rdkcentral/sat_stage_migration
vishnuajayccst Sep 2, 2025
e510417
Adding UnitTest
gravi21 Sep 12, 2025
4e489d9
UT Corrections
gravi21 Sep 12, 2025
f57e9d0
Added Credits to NOTICE and added BSD-3 license to LICENSE file
gravi21 Sep 12, 2025
9840716
cleaned test data
gravi21 Sep 15, 2025
2b4cc21
refactor: enhance CreateWakeupPoolHandler to handle unsupported force…
bhushan-mdn Sep 15, 2025
7bd759a
Merge pull request #27 from rdkcentral/gopi_dev
gravi21 Sep 15, 2025
e9aeea1
Merge branch 'develop' into fix_wakeuppool_force_flag
bhushan-mdn Sep 15, 2025
c84dd0a
Merge pull request #28 from rdkcentral/fix_wakeuppool_force_flag
bhushan-mdn Sep 15, 2025
c0d5adb
XDPXCONF-1550: DCM TestPage Fix
gravi21 Sep 17, 2025
3571fbc
Merge pull request #31 from rdkcentral/gopi_dev
sanwar96 Sep 18, 2025
5220b0b
Update README and sample configuration with enhanced documentation an…
vishnuajayccst Sep 22, 2025
8b1ea88
Update API endpoints and enhance directory structure in README
vishnuajayccst Sep 23, 2025
251e59b
Merge pull request #32 from rdkcentral/doc_update/xconfadmin
vishnuajayccst Sep 23, 2025
4fc5b81
Fix UT
gravi21 Sep 25, 2025
a6df582
Merge pull request #38 from rdkcentral/fix_ut_dev
gravi21 Sep 25, 2025
3b5a7ce
Update code to use DistributedLock instead of sync.Mutex
pt-nguyen Oct 1, 2025
507603e
Merge pull request #41 from rdkcentral/phuong-dev
pt-nguyen Oct 2, 2025
d3ad16d
Removed unwanted script file
gravi21 Oct 7, 2025
d095dbb
Merge pull request #42 from rdkcentral/remove_script
gravi21 Oct 7, 2025
3c7c10e
Deploy cla action
rdkcmf-jenkins Oct 7, 2025
621d3cd
Merge pull request #44 from rdkcentral/feature/actions/develop-cla
Alan-Ryan Oct 7, 2025
1e3dd2f
Changed status code on DistributedLock failure
pt-nguyen Oct 9, 2025
3b72378
Merge pull request #47 from rdkcentral/phuong-dev
pt-nguyen Oct 9, 2025
ac4e5d6
Add unit tests for canary settings handlers and processing logic
Oct 10, 2025
34bdcc6
Code Coverage for DCM,Queries
gravi21 Oct 13, 2025
b6e458d
Percent filter coverages
gravi21 Oct 13, 2025
d2546ca
Correction
gravi21 Oct 13, 2025
fbf519c
Telemetry initial CC
gravi21 Oct 13, 2025
4188ce7
telemetry_profile_controller test
gravi21 Oct 13, 2025
d8babdb
telemetry rule handler test
gravi21 Oct 13, 2025
5224603
telemetry v2 rule handler
gravi21 Oct 13, 2025
4c3669f
RFC Code Coverage
gravi21 Oct 14, 2025
04de990
CC for Env, rfc
gravi21 Oct 14, 2025
9446bd5
Fix RFC UT
gravi21 Oct 14, 2025
656c7e2
Coverage for telemetry change
gravi21 Oct 14, 2025
2c24449
Move up log setup
sding175 Oct 14, 2025
638c2e0
Adding filter service Coverage
gravi21 Oct 15, 2025
a8947d7
Improved CC for various modules
gravi21 Oct 16, 2025
5aec49e
Tagging Testcases and Coverage
gravi21 Oct 16, 2025
2ae3e3f
Merge pull request #49 from rdkcentral/sding_dev
sding921 Oct 16, 2025
97ab238
redesigned tagging API:
Oct 16, 2025
93e2794
removed local dev lines
Oct 16, 2025
be52e1b
Merge branch 'feature/code_coverage' of rdkcentral:rdkcentral/xconfad…
yeswanth2420 Oct 17, 2025
2d7d9ea
lockdown package coverage update
yeswanth2420 Oct 17, 2025
fe4a564
setting package coverage added
yeswanth2420 Oct 17, 2025
cfc4bc6
xcrp coverage added
yeswanth2420 Oct 17, 2025
7d62c9c
Fixes for UT
gravi21 Oct 17, 2025
d8866a9
Merge pull request #50 from rdkcentral/tag-api-redesign
mdolina Oct 17, 2025
09f0e3a
Improving CC
gravi21 Oct 18, 2025
d13d811
updated xconfwebconfig version
Oct 21, 2025
97c8964
Merge pull request #51 from rdkcentral/updated-dependencies
mdolina Oct 21, 2025
cd52031
fixed the conversion issue
Oct 21, 2025
73d1ec5
Merge pull request #52 from rdkcentral/migration-commands
mdolina Oct 22, 2025
8658bce
improved migration API, made it job style API; removed unneeded tests
Oct 22, 2025
eada062
added recovery to the tag migration job to not cause service crash in…
Oct 22, 2025
6d1d3fd
Merge pull request #53 from rdkcentral/tag-migration-job-api
mdolina Oct 23, 2025
c16f807
added debug logs to http client
Oct 24, 2025
cf4929d
New set of Coverage changes
gravi21 Oct 28, 2025
285658e
Improving Coverage
gravi21 Oct 28, 2025
c6e28aa
feature_handler_test.
gravi21 Oct 28, 2025
b9c062f
removed comment
mdolina Oct 28, 2025
b1edcd5
Merge pull request #54 from rdkcentral/tagging-debugging
mdolina Oct 29, 2025
df20821
Adding more Coverage
gravi21 Oct 30, 2025
4a3949a
tagging interface conversion issue:
mdolina Nov 9, 2025
810557f
Fix UT
gravi21 Nov 10, 2025
1e33a2b
Added distributed_lock_enabled flag
pt-nguyen Nov 13, 2025
db7a973
Merge pull request #60 from rdkcentral/phuong-dev
pt-nguyen Nov 13, 2025
836c1ac
Merge branch 'develop' into bugfix/tag-interface-cherry-pick
mdolina Nov 13, 2025
5952a7e
Merge pull request #59 from rdkcentral/bugfix/tag-interface-cherry-pick
mdolina Nov 13, 2025
cd2450f
updated xconfwebconfig dependency
mdolina Nov 13, 2025
30b850e
Fix tag removal when some entries are missing in XDAS
mdolina Nov 13, 2025
e2078d2
Merge pull request #61 from rdkcentral/bugfix/tag-removal-missing-ent…
mdolina Nov 13, 2025
fbfbe63
Fix get tag member if tag does not exist return 404 response
mdolina Nov 14, 2025
7b9eb86
Merge branch 'develop' into bugfix/get-tag-member
mdolina Nov 14, 2025
fc09b63
go mod tidy
mdolina Nov 14, 2025
cfed820
Merge pull request #64 from rdkcentral/bugfix/get-tag-member
mdolina Nov 14, 2025
31f6388
paginated response: rename nextToken to cursor
mdolina Nov 17, 2025
7f1387a
make tag delete API running in a background to avoid http timeouts
mdolina Nov 17, 2025
ca03f6b
Merge pull request #67 from rdkcentral/bugfix/paginated-response
mdolina Nov 17, 2025
3a1f008
Refactor log upload settings tests to use mock DAO
vishnuajayccst Dec 12, 2025
cf3874b
Updating Crypto Pkg, fixing vulnerability issues
gravi21 Dec 26, 2025
522f955
- Remove migration endpoints and related files
mdolina Dec 29, 2025
bcbd840
Merge pull request #71 from rdkcentral/security_fix
gravi21 Dec 30, 2025
caab0ea
Refactor tests to use DeleteTelemetryEntities for optimized cleanup
vishnuajayccst Dec 30, 2025
d7798bc
Merge branch 'develop' into refactor/migration-cleanup
mdolina Dec 30, 2025
8ab1cfa
Adding Folders for Community Contribution
gravi21 Jan 7, 2026
b4e9754
Merge pull request #76 from rdkcentral/community_contrib_files
gravi21 Jan 8, 2026
d91c018
Refactor telemetry tests to use unified mock DAO functions
vishnuajayccst Jan 12, 2026
cb0e5b2
Merge branch 'develop' into refactor/migration-cleanup
mdolina Jan 12, 2026
159b901
Merge pull request #72 from rdkcentral/refactor/migration-cleanup
mdolina Jan 12, 2026
3e932f2
Refactor queries tests to use mock database and streamline DAO intera…
vishnuajayccst Jan 14, 2026
67152ce
Add api to retrieve latest preprocessed featureControl config
sding175 Jan 14, 2026
1b71556
Merge pull request #77 from rdkcentral/sding921_dev
sding921 Jan 14, 2026
6a63d81
Add files via upload
RahulRengeshOfficial Jan 19, 2026
924f69d
Update additional_service_test.go
RahulRengeshOfficial Jan 20, 2026
ed1d6f9
Update coverage_improvement_test.go
RahulRengeshOfficial Jan 20, 2026
dfef981
Update firmware_simple_test.go
RahulRengeshOfficial Jan 20, 2026
ece7932
Update additional_handler_test.go
RahulRengeshOfficial Jan 20, 2026
fe7eed8
Update additional_service_test.go
RahulRengeshOfficial Jan 20, 2026
a33b34c
Update coverage_improvement_test.go
RahulRengeshOfficial Jan 20, 2026
1c5a8e0
Merge pull request #78 from rdkcentral/addcoverage
RahulRengeshOfficial Jan 20, 2026
9004458
Enhance feature handler tests with mock database initialization and p…
vishnuajayccst Jan 20, 2026
fd88cfd
Merge pull request #79 from rdkcentral/ut_performance_optimize
RahulRengeshOfficial Jan 20, 2026
a2b95ce
Update tag_service.go
vishnuajayccst Jan 20, 2026
a22619d
Merge branch 'develop' into feature/code_coverage
vishnuajayccst Jan 20, 2026
2777f6e
Refactor and clean up tagging service tests
vishnuajayccst Jan 20, 2026
8c6ecbc
Update idp_service_handler_test.go
RahulRengeshOfficial Jan 20, 2026
535ec56
Update telemetry_two_change_handler_test.go
RahulRengeshOfficial Jan 20, 2026
a551cc5
Update device_settings_e2e_test.go
RahulRengeshOfficial Jan 20, 2026
2e074f5
Update tag_service_test.go
RahulRengeshOfficial Jan 20, 2026
5104b4a
Update telemetry_two_profile_handler_test.go
RahulRengeshOfficial Jan 20, 2026
9dfc20f
Update telemetry_two_change_handler_test.go
RahulRengeshOfficial Jan 20, 2026
86cf1b1
Add unit tests for response handling and validation functions
vishnuajayccst Jan 21, 2026
c3695c5
Fixed copyright issue to multiple test files
vishnuajayccst Jan 21, 2026
00ff62e
modify the api to retrieve preprocessed featureControl config
sding175 Jan 21, 2026
4f81cc1
Merge pull request #82 from rdkcentral/sding921_dev
sding921 Jan 26, 2026
170074e
remove api handler that forwards request to data service
sding175 Jan 27, 2026
ff85a1c
Merge pull request #83 from rdkcentral/sding921_dev
sding921 Jan 27, 2026
c37ce65
Create feature_control_settings_test.go
RahulRengeshOfficial Jan 28, 2026
65a27f7
Merge branch 'develop' into unitcoverage
RahulRengeshOfficial Jan 28, 2026
bfadc2a
Added tests package for firmware configurations and rules
vishnuajayccst Jan 29, 2026
c084dbf
XConf Tagging: external tool fails to reliably add/remove devices and…
mdolina Jan 29, 2026
fd6a352
Update canary_settings_service.go
RahulRengeshOfficial Feb 2, 2026
84d245b
Update dcmformula_service.go
RahulRengeshOfficial Feb 2, 2026
890b6a0
Update dcmformula_service.go
RahulRengeshOfficial Feb 2, 2026
a0ccdea
Update lockdown_settings_service.go
RahulRengeshOfficial Feb 2, 2026
c59ae4e
Update prioritizable.go
RahulRengeshOfficial Feb 2, 2026
d8ce636
RDKCLOUD-211-Fix the review comments shared by XCONF team for Xconf a…
LakshmipriyaPurushan Feb 2, 2026
ef50d88
Merge branch 'develop' into unitcoverage
gravi21 Feb 2, 2026
d2901e2
Remove unused test functions for processing canary and lockdown settings
vishnuajayccst Feb 3, 2026
1b3c063
Merge pull request #84 from rdkcentral/unitcoverage
vishnuajayccst Feb 4, 2026
816b113
Remove mock data file `mock_data.go` from tests directory to clean up…
vishnuajayccst Feb 12, 2026
e365e73
Update namespaced_list_service_test.go
RahulRengeshOfficial Feb 16, 2026
198e54f
Merge pull request #89 from rdkcentral/ut_fix_package
vishnuajayccst Feb 16, 2026
a54d2ac
Reduced latency by invoking ForceSyncChanges() before acquiring table…
pt-nguyen Feb 23, 2026
3b1e689
Merge pull request #90 from rdkcentral/phuong-dev
pt-nguyen Feb 23, 2026
994b74a
Implement MAC list reference validation in firmware rules and add cor…
yeswanth2420 Mar 6, 2026
07c523d
Merge pull request #91 from rdkcentral/validate_maclists
yeswanth2420 Mar 6, 2026
583ff44
Revert "Implement MAC list reference validation in firmware rules and…
yeswanth2420 Mar 10, 2026
19fbdf3
Merge pull request #92 from rdkcentral/revert-91-validate_maclists
yeswanth2420 Mar 10, 2026
457b94f
Add MAC list reference validation in firmware rule creation/update
yeswanth2420 Mar 10, 2026
7e557cb
Add unit test for MAC list reference validation in firmware rules
yeswanth2420 Mar 10, 2026
188d835
Remove test for MAC list reference validation from firmware rule tests
yeswanth2420 Mar 10, 2026
21af8f8
Merge pull request #93 from rdkcentral/macList_validation
yeswanth2420 Mar 10, 2026
d77fa8b
Improve MAC list reference validation error handling in firmware rules
yeswanth2420 Mar 12, 2026
92a238d
Merge pull request #96 from rdkcentral/macList_validation
yeswanth2420 Mar 12, 2026
a78aa11
Add model and IP address list reference validation for rule condition…
guru-ossdev Apr 2, 2026
fbbcddb
add more detailed error message for blank or empty model value
guru-ossdev Apr 2, 2026
07c8fb2
fix: normalize model ID case before existence validation
guru-ossdev Apr 3, 2026
58fe120
fix: normalize fixedArgValue to uppercase before model existence check
guru-ossdev Apr 3, 2026
a330db2
fix: return normalized model name in error message for non-existent m…
guru-ossdev Apr 3, 2026
9a8734b
test: add validation tests for model and IP list references in percen…
guru-ossdev Apr 3, 2026
24fce34
test: add unit tests for model and IP list reference validation
guru-ossdev Apr 3, 2026
5d1321a
fix: enhance validation for optional conditions in percentage bean re…
guru-ossdev Apr 3, 2026
3be1e1c
fix: update import for rulesengine normalization function in percenta…
guru-ossdev Apr 3, 2026
95f5953
Merge pull request #98 from rdkcentral/feature/validate-model-and-ip-…
guru-ossdev Apr 3, 2026
efac276
Initial check-in to support multi-tenant
pt-nguyen Apr 23, 2026
1502dd3
Fix flaky tests: add SkipIfMockDatabase pattern, unique IDs, and sequ…
RahulRengeshOfficial Apr 29, 2026
c6a66d1
Handled tenant_id for DeleteAllEntities
pt-nguyen Apr 29, 2026
81e3505
Merge pull request #114 from rdkcentral/mockdb-unittest
pt-nguyen Apr 29, 2026
4f25fb0
Updated truncateTable to support tenantId param
pt-nguyen Apr 29, 2026
2a12510
Fixed test failures due to missing tenantId in context
pt-nguyen Apr 29, 2026
21aaf6a
Fixed tests
pt-nguyen Apr 30, 2026
a58a777
Fixed tests
pt-nguyen Apr 30, 2026
9c05d1c
Fixed tests failures
pt-nguyen May 12, 2026
eebe621
Updated due to changes from PenetrationMetrics to PenetrationData
pt-nguyen May 19, 2026
d3aeff6
Fixed tenantId is not set in contextMap for some of the APIs
pt-nguyen May 20, 2026
847d90d
fix: port idempotent test fixes to multi-tenant branch
RahulRengeshOfficial May 21, 2026
ee86fdf
feat: add test summary script and update Makefile
RahulRengeshOfficial May 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "CLA"

permissions:
contents: read
pull-requests: write
actions: write
statuses: write

on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]

jobs:
CLA-Lite:
name: "Signature"
uses: rdkcentral/cmf-actions/.github/workflows/cla.yml@v1
secrets:
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ASSISTANT }}
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,30 @@
See the License for the specific language governing permissions and
limitations under the License.

BSD-3 LICENSE

Copyright <YEAR> <COPYRIGHT HOLDER>

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@
#
GOARCH = $(shell go env GOARCH)
GOOS = $(shell go env GOOS)

REPO := github.com/rdkcentral/xconfadmin
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
Version ?= $(shell git log -1 --pretty=format:"%h")
BUILDTIME := $(shell date -u +"%F_%T_%Z")

all: build

build: ## Build a version
go build -v -ldflags="-X xconfadmin/common.BinaryBranch=${BRANCH} -X xconfadmin/common.BinaryVersion=${Version} -X xconfadmin/common.BinaryBuildTime=${BUILDTIME}" -o bin/xconfadmin-${GOOS}-${GOARCH} main.go
build: ## Build a version
go build -v -ldflags="-X ${REPO}/common.BinaryBranch=${BRANCH} -X ${REPO}/common.BinaryVersion=${Version} -X ${REPO}/common.BinaryBuildTime=${BUILDTIME}" -o bin/xconfadmin-${GOOS}-${GOARCH} main.go

test:
ulimit -n 10000 ; go test ./... -cover -count=1
bash contrib/scripts/run_tests_with_summary.sh

localtest:
export RUN_IN_LOCAL=true ; go test ./... -cover -count=1 -failfast

cover:
go test ./... -count=1 -coverprofile=coverage.out
go test ./... -count=1 -p 1 -coverprofile=coverage.out -timeout=45m

html:
go tool cover -html=coverage.out
Expand All @@ -44,4 +44,4 @@ clean: ## Remove temporary files
go clean --testcache

release:
go build -v -ldflags="-X xconfadmin/common.BinaryBranch=${BRANCH} -X xconfadmin/common.BinaryVersion=${Version} -X xconfadmin/common.BinaryBuildTime=${BUILDTIME}" -o bin/xconfadmin-${GOOS}-${GOARCH} main.go
go build -v -ldflags="-X ${REPO}/common.BinaryBranch=${BRANCH} -X ${REPO}/common.BinaryVersion=${Version} -X ${REPO}/common.BinaryBuildTime=${BUILDTIME}" -o bin/xconfadmin-${GOOS}-${GOARCH} main.go
8 changes: 7 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@ This product includes software developed at Comcast (http://www.comcast.com/).
The component may include material which is licensed under other licenses / copyrights as
listed below. Your use of this material within the component is also subject to the terms and
conditions of these licenses. The LICENSE file contains the text of all the licenses which apply
within this component.
within this component.

Copyright 2012 The Go Authors. All rights reserved.
Licensed under the BSD-3 License

Copyright (c) 2023 The Gorilla Authors. All rights reserved.
Licensed under the BSD-3 License
260 changes: 240 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,253 @@
# xconfadmin
# XConf Admin

This project is to implement a configuration management server. RDK devices download configurations from this server during bootup or notified when updates are available.
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Go Version](https://img.shields.io/badge/Go-1.23%2B-blue.svg)](https://golang.org/)
[![Build Status](https://img.shields.io/badge/Build-Passing-green.svg)]()

XConf Admin is a comprehensive configuration management server designed for RDK (Reference Design Kit) devices. It provides a centralized platform for managing device configurations, firmware updates, telemetry settings, and various administrative functions across RDK deployments.

## Install go
## 🚀 Features

This project is written and tested with Go **1.23***
- **Configuration Management**: Centralized management of device configurations
- **Firmware Management**: Control firmware distribution and updates
- **Telemetry Services**: Manage telemetry profiles and data collection
- **Device Control Manager (DCM)**: Handle device control and settings
- **Feature Management**: Control feature flags and rules
- **Authentication & Authorization**: JWT-based security with role-based access control
- **RESTful API**: Comprehensive REST API for all operations
- **Metrics & Monitoring**: Built-in Prometheus metrics support
- **Canary Deployments**: Support for gradual rollouts

## Build the binary
```shell
cd $HOME/go/src/github.com/comcast-cl/xconfadmin
make
## 📋 Prerequisites

- **Go 1.23+**: This project requires Go version 1.23 or later
- **Cassandra**: For data persistence (configure in config file)
- **Git**: For version control and building

## 🛠️ Installation

### 1. Clone the Repository

```bash
git clone https://github.com/rdkcentral/xconfadmin.git
cd xconfadmin
```

### 2. Install Dependencies

```bash
go mod download
```

### 3. Build the Application

```bash
make build
```

This will create a binary `bin/xconfadmin-{OS}-{ARCH}` (e.g., `bin/xconfadmin-linux-amd64`)

## ⚙️ Configuration

### Environment Variables

Set the following required environment variables:

```bash
export SAT_CLIENT_ID='your_client_id'
export SAT_CLIENT_SECRET='your_client_secret'
export SECURITY_TOKEN_KEY='your_security_token_key'
```

### Configuration File

Create a configuration file based on the sample provided:

```bash
cp config/sample_xconfadmin.conf config/xconfadmin.conf
```
**bin/xconfadmin-linux-amd64** will be created.

## Run the application
The application includes an API to notify RDK devices to download updated configurations from this server. A JWT token is required to communicate with service. The credentials are passed to the application through environment variables. A configuration file can be passed as an argument when the application starts. config/sample_xconfadmin.conf is an example.
Edit the configuration file to match your environment settings including:
- Server port and timeouts
- Database connection details
- Logging configuration
- Authentication settings
- Service endpoints

## 🚀 Running the Application

```shell
export SAT_CLIENT_ID='xxxxxx'
export SAT_CLIENT_SECRET='yyyyyy'
export SECURITY_TOKEN_KEY='zzzzzz'
### 1. Create Log Directory

```bash
mkdir -p /app/logs/xconfadmin
cd $HOME/go/src/github.com/comcast-cl/xconfadmin
bin/xconfadmin-linux-amd64 -f config/sample_xconfadmin.conf
```

```shell
curl http://localhost:9000/api/v1/version
{"status":200,"message":"OK","data":{"code_git_commit":"2ac7ff4","build_time":"Thu Feb 14 01:57:26 2019 UTC","binary_version":"317f2d4","binary_branch":"develop","binary_build_time":"2021-02-10_18:26:49_UTC"}}
### 2. Start the Server

```bash
bin/xconfadmin-linux-amd64 -f config/xconfadmin.conf
```

### 3. Verify Installation

Test the server is running:

```bash
curl http://localhost:9001/api/v1/version
```

Expected response:
```json
{
"status": 200,
"message": "OK",
"data": {
"code_git_commit": "abc123",
"build_time": "2025-09-08T10:00:00Z",
"binary_version": "v1.0.0",
"binary_branch": "main",
"binary_build_time": "2025-09-08_10:00:00_UTC"
}
}
```

## 📖 API Documentation

The XConf Admin server provides several API endpoints organized by functionality:

### Core APIs

- **Version**: `GET /version` - Get application version info
- **Health**: `GET /healthz` - Health check endpoint
- **Metrics**: `GET /metrics` - Prometheus metrics

### Administrative APIs

- **Authentication**: `/auth/*` - Authentication and authorization
- **Firmware**: `/firmware/*` - Firmware management
- **DCM**: `/dcm/*` - Device Control Manager
- **Telemetry**: `/telemetry/*` - Telemetry configuration
- **Features**: `/feature/*` - Feature management
- **Settings**: `/setting/*` - Various device settings

### Example API Calls

```bash
# Get firmware configurations
curl -H "Authorization: Bearer <token>" http://localhost:9001/api/firmware/configs

# Update device settings
curl -X POST -H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"key":"value"}' \
http://localhost:9001/api/dcm/settings
```

## 🏗️ Project Structure

```
xconfadmin/
├── adminapi/ # Admin API handlers and business logic
│ ├── auth/ # Authentication and authorization
│ ├── canary/ # Canary deployment management
│ ├── change/ # Change management
│ ├── configuration/ # Configuration management APIs and logic
│ ├── dcm/ # Device Control Manager
│ ├── firmware/ # Firmware management
│ ├── lockdown/ # Lockdown and recooking logic
│ ├── queries/ # Query handlers
│ ├── rfc/ # Remote Feature Control
│ ├── setting/ # Settings management
│ ├── telemetry/ # Telemetry services
│ └── xcrp/ # XConf Configuration Rollback Platform (XCRP) logic
├── common/ # Common utilities and constants
├── config/ # Configuration files
├── http/ # HTTP utilities and middleware
├── shared/ # Shared components
├── taggingapi/ # Tagging API
└── util/ # Utility functions
```

## 🧪 Testing

### Run All Tests

```bash
make test
```

### Run Tests Locally

```bash
make localtest
```

### Generate Coverage Report

```bash
make cover
make html
```

## 🔧 Development

### Build for Development

```bash
make build
```

### Clean Build Artifacts

```bash
make clean
```

### Release Build

```bash
make release
```

## 📊 Monitoring

XConf Admin includes built-in monitoring capabilities:

- **Prometheus Metrics**: Available at `/metrics` endpoint
- **Health Checks**: Available at `/health` endpoint
- **Structured Logging**: JSON-formatted logs with configurable levels
- **Request Tracing**: Optional OpenTelemetry integration

## 🤝 Contributing

We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.

### Development Workflow

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests for new functionality
5. Run the test suite
6. Submit a pull request

## 📄 License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.

## 🆘 Support

For support and questions:

- Create an issue in the GitHub repository
- Check the [documentation](docs/)
- Review existing issues and discussions

## 🔗 Related Projects

- [xconfwebconfig](https://github.com/rdkcentral/xconfwebconfig) - Web configuration service
- [RDK Central](https://github.com/rdkcentral) - RDK Central organization

---

**Note**: This is a configuration management server for RDK devices. Ensure proper security measures are in place when deploying in production environments.
Loading
Loading