Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
433 commits
Select commit Hold shift + click to select a range
e9d9493
Merge pull request #195 from rdkcentral/james-dev
lstruman Sep 5, 2024
3a24698
Add debug loggings for 403 error analysis
lstruman Sep 3, 2024
820b678
Add debug loggings for 403 error analysis
lstruman Sep 3, 2024
98e9e7d
Add debug loggings for 403 error analysis
lstruman Sep 5, 2024
4e9fd6b
Merge pull request #196 from rdkcentral/cherrypick-log403
lstruman Sep 10, 2024
bdd12bb
return 404 for NONE-REBOOT without subdocs
lstruman Sep 10, 2024
616e068
Merge pull request #197 from rdkcentral/james-dev
lstruman Sep 10, 2024
ec1f5b7
return 404 for NONE-REBOOT without subdocs
lstruman Sep 10, 2024
39ac9d0
Merge pull request #198 from rdkcentral/cherrypick-none-reboot-404
lstruman Sep 11, 2024
d165d6d
Reduce unnecessary upstream calls when no meta headers change
lstruman Sep 17, 2024
900eb75
Merge pull request #199 from rdkcentral/james-dev
lstruman Sep 17, 2024
ad941aa
add a flag to control the enabling of sarama logger
lstruman Sep 18, 2024
d4fba5e
Merge pull request #200 from rdkcentral/james-dev
lstruman Sep 18, 2024
016b28b
Merge pull request #201 from rdkcentral/develop
lstruman Sep 19, 2024
0c4814c
change frequently used headers from literals to consts
lstruman Sep 20, 2024
a879e3b
Merge pull request #202 from rdkcentral/james-dev
lstruman Sep 20, 2024
4232990
ix a bug that status=0 was logged when the last subdoc was deleted
lstruman Oct 1, 2024
34c986f
Merge pull request #203 from rdkcentral/james-dev
lstruman Oct 1, 2024
b766d8c
log kafka async producer errors
lstruman Oct 4, 2024
71610e8
Merge pull request #204 from rdkcentral/james-dev
lstruman Oct 4, 2024
da5879c
ix a bug that status=0 was logged when the last subdoc was deleted
lstruman Oct 1, 2024
217d7cf
log kafka async producer errors
lstruman Oct 4, 2024
07a4bb1
Merge pull request #205 from rdkcentral/cherrypick-async-producer-log…
lstruman Oct 8, 2024
7ff2a1f
handle 202 returned by webpa poke
lstruman Oct 9, 2024
8a6c59d
Merge pull request #206 from rdkcentral/james-dev
lstruman Oct 9, 2024
261b2e5
update states only when the version in the notification matches the v…
lstruman Oct 10, 2024
987a346
Merge pull request #207 from rdkcentral/james-dev
lstruman Oct 10, 2024
9108c39
change the poke 204 condition to all deployed
lstruman Oct 12, 2024
77eeb94
Merge pull request #208 from rdkcentral/james-dev
lstruman Oct 12, 2024
a0a7c01
fix a bug that version matched subdocs are not backfilled from upstream
lstruman Oct 16, 2024
0735172
Merge pull request #209 from rdkcentral/james-dev
lstruman Oct 16, 2024
5f819c0
update states only when the version in the notification matches the v…
lstruman Oct 10, 2024
b83d57a
change the poke 204 condition to all deployed
lstruman Oct 12, 2024
872d747
fix a bug that version matched subdocs are not backfilled from upstream
lstruman Oct 16, 2024
a13d53a
Merge pull request #210 from rdkcentral/cherrypick-2024-oct-18
lstruman Oct 19, 2024
132e15a
change frequently used headers from literals to consts
lstruman Sep 20, 2024
a1dc8d2
Merge pull request #211 from rdkcentral/cherrypick-2024-oct-18
lstruman Oct 19, 2024
04a2dc4
check nil conditions for kafka async producer errors
lstruman Oct 19, 2024
fe85cfa
Merge pull request #212 from rdkcentral/james-dev
lstruman Oct 19, 2024
63e902b
check the nil condition for kafka async producer successes
lstruman Oct 21, 2024
1da11e5
Merge pull request #213 from rdkcentral/james-dev
lstruman Oct 21, 2024
bef8fc7
check nil conditions for kafka async producer errors
lstruman Oct 19, 2024
9bd2c8f
check the nil condition for kafka async producer successes
lstruman Oct 21, 2024
d407369
Merge pull request #214 from rdkcentral/cherrypick-async-producer-res…
lstruman Oct 22, 2024
b254873
add bitmap supprot for subdoc webui
lstruman Oct 22, 2024
9353e9b
Merge pull request #215 from rdkcentral/james-dev
lstruman Oct 22, 2024
1ae6e58
fix a bug that 500 was returned when the reference doc was not found
lstruman Oct 26, 2024
cdda9af
Merge pull request #216 from rdkcentral/james-dev
lstruman Oct 26, 2024
cbca2d6
handle 202 returned by webpa poke
lstruman Oct 9, 2024
7c09ed9
Merge pull request #217 from rdkcentral/cherrypick-poke-202
lstruman Oct 30, 2024
bf83753
change the updated_time as usual even if state=1
lstruman Oct 30, 2024
120e187
Merge pull request #218 from rdkcentral/james-dev
lstruman Oct 30, 2024
3845b7d
return 409 if the root_document is locked
lstruman Nov 1, 2024
a9c48c6
Merge pull request #219 from rdkcentral/james-dev
lstruman Nov 1, 2024
a01d3bb
change the updated_time as usual even if state=1
lstruman Oct 30, 2024
459d72d
Merge pull request #220 from rdkcentral/cherrypick-state1-upddate
lstruman Nov 4, 2024
c75288f
add a control flag for root_document locking
lstruman Nov 4, 2024
f8f5899
Merge pull request #221 from rdkcentral/james-dev
lstruman Nov 4, 2024
f8a86a2
fix a bug that 500 was returned when the reference doc was not found
lstruman Oct 26, 2024
6cd321e
Merge pull request #222 from rdkcentral/cherrypick-noreference-handling
lstruman Nov 8, 2024
93a333f
return 409 if the root_document is locked
lstruman Nov 1, 2024
6297aa0
add a control flag for root_document locking
lstruman Nov 4, 2024
a1de683
Merge pull request #223 from rdkcentral/cherrypick-lock-root-document
lstruman Nov 8, 2024
b5b428c
add bitmap supprot for subdoc webui
lstruman Oct 22, 2024
ce84f32
Merge pull request #224 from rdkcentral/cherrypick-webui-bitmap
lstruman Nov 12, 2024
33f6466
add an option to read profiles from upstream
lstruman Nov 14, 2024
eb403b2
Merge pull request #225 from rdkcentral/james-dev
lstruman Nov 14, 2024
b289cbe
fix a bug that error_code and error_details were not cleanup during s…
lstruman Nov 14, 2024
816628b
Merge pull request #226 from rdkcentral/james-dev
lstruman Nov 14, 2024
e037db0
fix a bug that error_code and error_details were not cleanup during s…
lstruman Nov 14, 2024
bf3d308
Merge pull request #227 from rdkcentral/cherrypick-errorcodes-fix
lstruman Nov 15, 2024
e00d70e
enforce strict format in device GET route
lstruman Nov 16, 2024
86c2081
Merge pull request #228 from rdkcentral/james-dev
lstruman Nov 16, 2024
f4b217e
add token trust validation
lstruman Nov 17, 2024
903611d
Merge pull request #229 from rdkcentral/james-dev
lstruman Nov 17, 2024
07e4e16
cherrypick strict format check and resolve conflicts
lstruman Nov 16, 2024
f0daec5
Merge pull request #230 from rdkcentral/cherrypick-strict-format-check
lstruman Nov 18, 2024
ddbbb08
accept non bitmap subdocs when the validator is enabled during device…
lstruman Nov 20, 2024
f2d3450
Merge pull request #231 from rdkcentral/james-dev
lstruman Nov 20, 2024
7ccaf8c
cherrypick non bitmap validation and resolve conflicts
lstruman Nov 20, 2024
3aea3ad
Merge pull request #232 from rdkcentral/cherrypick-strict-format-chec…
lstruman Nov 20, 2024
9a1c893
cherrypick the feature to validate token trust value and resolve conf…
lstruman Nov 17, 2024
d6ff5a9
Merge pull request #233 from rdkcentral/cherrypick-token-trust-validaton
lstruman Nov 21, 2024
969249e
log details for token errors
lstruman Nov 26, 2024
d3a7823
Merge pull request #234 from rdkcentral/james-dev
lstruman Nov 26, 2024
8200e8d
log details for token errors
lstruman Nov 26, 2024
9d9ca15
Merge pull request #235 from rdkcentral/cherrypick-log-token-err
lstruman Nov 27, 2024
884fff2
cherrypick upstream profiles and merge conflicts
lstruman Nov 14, 2024
f3032de
Merge pull request #236 from rdkcentral/cherrypick-upstream-profiles
lstruman Dec 4, 2024
eb7872f
Add support for poke root and telemetry together
lstruman Dec 4, 2024
22dafa8
Merge pull request #237 from rdkcentral/james-dev
lstruman Dec 4, 2024
7e32cdd
set updated_time in the case of state correction
lstruman Dec 10, 2024
1801e4e
Merge pull request #238 from rdkcentral/james-dev
lstruman Dec 10, 2024
bb27227
set updated_time in the case of state correction
lstruman Dec 10, 2024
c4bb805
Merge pull request #239 from rdkcentral/cherrypick-bugfix-updated_time
lstruman Dec 11, 2024
6b6de0b
propagate headers for tracing
lstruman Dec 12, 2024
022e3ce
Merge pull request #240 from rdkcentral/james-dev
lstruman Dec 12, 2024
9b69306
remove otel span codes
lstruman Dec 13, 2024
5fccaa9
Merge pull request #241 from rdkcentral/james-dev
lstruman Dec 13, 2024
e454080
restore otel codes
lstruman Dec 18, 2024
24a94ce
Merge pull request #242 from rdkcentral/james-dev
lstruman Dec 18, 2024
751143d
add back a missed file
lstruman Dec 18, 2024
a0b66d0
Merge pull request #243 from rdkcentral/james-dev
lstruman Dec 18, 2024
6bea1ad
handle tracing propagation
lstruman Dec 20, 2024
127cee1
add back calling otelshutdown
lstruman Dec 20, 2024
13a9c62
roll back go.mod to use 1.21
lstruman Dec 20, 2024
2d72e45
Merge pull request #244 from rdkcentral/james-dev
lstruman Dec 20, 2024
a5984fb
change the poke keyword from primary to root
lstruman Dec 21, 2024
29afd6e
Merge pull request #245 from rdkcentral/james-dev
lstruman Dec 21, 2024
bf96308
Set Otel Span attribute for x-cl-expt
rvsubbu Dec 23, 2024
656f401
Merge pull request #246 from rvsubbu/rv_dev
lstruman Dec 23, 2024
67aa9fb
merge n-1 and resolve conflicts
lstruman Dec 24, 2024
a773ed3
Merge pull request #248 from rdkcentral/james-dev
lstruman Dec 24, 2024
5c38f8c
Merge pull request #249 from rdkcentral/develop
lstruman Dec 24, 2024
228e911
Migrate/adapt/rewrite tracing
rvsubbu Dec 30, 2024
0e5f43a
Remove all homegrown algorithm code as it is never going to be used
rvsubbu Dec 30, 2024
2bff04a
Merge pull request #250 from rvsubbu/rv_dev
lstruman Dec 31, 2024
04acd43
Merge pull request #251 from rdkcentral/develop
lstruman Dec 31, 2024
4905893
case diffs in env var e.g. use site_color instead of SITE_COLOR
rvsubbu Jan 2, 2025
1beee4a
Merge pull request #252 from rvsubbu/rv_dev
lstruman Jan 3, 2025
a50cf7f
Typo
rvsubbu Jan 3, 2025
777b1d3
Merge pull request #253 from rvsubbu/rv_dev
lstruman Jan 6, 2025
776d7e9
Merge pull request #254 from rdkcentral/develop
lstruman Jan 6, 2025
dbdee27
Standardize logs - use "message" instead of "msg"
rvsubbu Jan 7, 2025
d4b65a0
Merge pull request #255 from rvsubbu/rv_dev
lstruman Jan 7, 2025
b6bdcf2
fix a bug that new spanid are not included in the traceparent of outg…
lstruman Jan 8, 2025
9d61ad7
Merge pull request #256 from rdkcentral/james-dev
lstruman Jan 8, 2025
ba3211f
Merge pull request #257 from rdkcentral/develop
lstruman Jan 8, 2025
e9e969a
Make external url templates configurable
lstruman Jan 13, 2025
0e84777
Merge pull request #258 from rdkcentral/james-dev
lstruman Jan 13, 2025
51270b4
Merge pull request #259 from rdkcentral/develop
lstruman Jan 14, 2025
51f619e
tracing codes rearranged
lstruman Jan 15, 2025
13e8d5c
remove unused func args
lstruman Jan 15, 2025
087035a
clean up unused contexts
lstruman Jan 15, 2025
719198d
clean up used contexts cont.
lstruman Jan 15, 2025
3bf15ca
small changes in tracing context functions
lstruman Jan 16, 2025
85b9308
small changes based on review
lstruman Jan 20, 2025
6a819ca
Merge pull request #260 from rdkcentral/james-dev
lstruman Jan 22, 2025
d99ae6d
Refactoring missed the tag settig part
rvsubbu Jan 23, 2025
4e1ff75
Merge pull request #261 from rvsubbu/rv_dev
lstruman Jan 24, 2025
4fcd3a3
Merge pull request #262 from rdkcentral/develop
lstruman Jan 28, 2025
514667e
filter webconfig output by bitmap
lstruman Jan 29, 2025
75459c1
Merge pull request #263 from rdkcentral/james-dev
lstruman Jan 29, 2025
fb559f4
add a log field and some cleanup
lstruman Jan 30, 2025
2980e2f
Merge pull request #264 from rdkcentral/james-dev
lstruman Jan 30, 2025
2e703c5
Merge pull request #265 from rdkcentral/develop
lstruman Feb 4, 2025
c77a999
propagate request response headers
lstruman Feb 16, 2025
e5d8b76
Merge pull request #266 from rdkcentral/james-dev
lstruman Feb 16, 2025
abc0717
handle mqtt poke 403 errors
lstruman Feb 19, 2025
e27b79e
Merge pull request #267 from rdkcentral/james-dev
lstruman Feb 19, 2025
ad8ff9a
Handle header x-cl-canary for moracide
lstruman Feb 19, 2025
796096a
Merge pull request #268 from rdkcentral/james-dev
lstruman Feb 19, 2025
cea2264
Merge pull request #269 from rdkcentral/develop
lstruman Feb 21, 2025
a5e599d
Fix a bug that 200 empty profiles were return when both xconf and ups…
lstruman Mar 1, 2025
7aec3ba
Merge pull request #270 from rdkcentral/james-dev
lstruman Mar 1, 2025
0652e25
Merge branch 'develop' of github.com:rdkcentral/webconfig into develop
rvsubbu Mar 5, 2025
762bae9
Add version info to otel instrumentation
rvsubbu Mar 5, 2025
ea14fd0
Add SHA to version info
rvsubbu Mar 6, 2025
fa97206
Merge pull request #271 from rvsubbu/rv_zzz
lstruman Mar 6, 2025
4e59b16
version info to include app name
rvsubbu Mar 10, 2025
890a77b
Merge pull request #272 from rvsubbu/rv_zzz
lstruman Mar 10, 2025
d09d5b6
Cherrypick of adding appname to version
rvsubbu Mar 11, 2025
e9d2a06
Merge pull request #273 from rvsubbu/developn-1
lstruman Mar 12, 2025
9a2e876
support subdocs without bitmaps
lstruman Mar 19, 2025
de90cdb
skip logging pending notifications
lstruman Mar 19, 2025
f706a41
Merge pull request #274 from rdkcentral/james-dev
lstruman Mar 20, 2025
a1a2e58
Parse the bitmap of the channelplan subdoc
lstruman Mar 21, 2025
d9d30d5
Merge pull request #277 from rdkcentral/james-dev
lstruman Mar 21, 2025
4f573d5
skip logging pending notifications
lstruman Mar 19, 2025
f818474
Merge pull request #278 from rdkcentral/cherrypick-telemetry-log
lstruman Mar 22, 2025
d6808b9
Parse the bitmap of the channelplan subdoc
lstruman Mar 21, 2025
24d47f0
Merge pull request #279 from rdkcentral/cherry-pick-bitmap-channelplan
lstruman Mar 25, 2025
db04afe
fix a bug that 200 was returned when no subdoc was sent
lstruman Mar 25, 2025
4cde486
Merge pull request #280 from rdkcentral/james-dev
lstruman Mar 25, 2025
39cbd57
cherrypick changes to support no-bitmap subdocs
lstruman Mar 19, 2025
21ee580
Merge pull request #281 from rdkcentral/cherrypick-subdocs-without-bi…
lstruman Mar 28, 2025
1bc05f8
fix a bug that 304 was returned when GET was without x-supported-docs…
lstruman Apr 24, 2025
c97c772
Merge pull request #284 from rdkcentral/james-dev
lstruman Apr 24, 2025
359426a
merge developn-1 branch and resolve conflicts
lstruman Apr 24, 2025
d505eb9
Merge pull request #285 from rdkcentral/james-dev
lstruman Apr 24, 2025
8789682
fix a bug that 304 was returned when GET was without x-supported-docs…
lstruman Apr 24, 2025
3dc63a0
Merge pull request #286 from rdkcentral/cherrypick-no-bitmap-header
lstruman Apr 24, 2025
b824a6a
update the dbinit.cql script for new columns
lstruman May 2, 2025
eb9f5f1
Merge pull request #287 from rdkcentral/james-dev
lstruman May 5, 2025
dc6909f
change the log level for db not found
lstruman Jul 13, 2025
81781b5
Merge pull request #289 from rdkcentral/james-dev
lstruman Jul 13, 2025
494e6a6
Just a more detailed error message
rvsubbu Jul 25, 2025
00f1e91
Standarize "Request started" and "Request finished" messages
rvsubbu Aug 26, 2025
1e317bc
Handle invalid cpemac value of 000000000000
rvsubbu Aug 26, 2025
adab517
Merge pull request #290 from rvsubbu/rv_dev
lstruman Aug 26, 2025
4a8161b
Fix a bug that payload was not updated after upstream if the new vers…
lstruman Nov 12, 2025
fe097b4
Merge pull request #292 from rdkcentral/james-dev
lstruman Nov 12, 2025
eca2d62
Fix a bug that payload was not updated after upstream if the new vers…
lstruman Nov 12, 2025
ed64ce2
Merge pull request #293 from rdkcentral/cherrypick-schema-update-bug
lstruman Nov 12, 2025
5592a8f
Just a more detailed error message
rvsubbu Jul 25, 2025
ef1c102
Standarize "Request started" and "Request finished" messages
rvsubbu Aug 26, 2025
0acce1e
Handle invalid cpemac value of 000000000000
rvsubbu Aug 26, 2025
9cb8c7d
Merge pull request #294 from rdkcentral/cherrypick-log-change-nov25
lstruman Nov 21, 2025
0a31007
fix a bug that bitmap filtering was not applied for NONE/NONE-REBOOT …
lstruman Dec 3, 2025
47915d8
Merge pull request #295 from rdkcentral/james-dev
lstruman Dec 3, 2025
103f782
modify the use patterns of rand package
lstruman Dec 3, 2025
76e67b6
Merge pull request #296 from rdkcentral/james-dev
lstruman Dec 3, 2025
30f979a
fix a bug that bitmap filtering was not applied for NONE/NONE-REBOOT …
lstruman Dec 3, 2025
f2df8b1
modify the use patterns of rand package
lstruman Dec 3, 2025
58e31f4
Merge pull request #297 from rdkcentral/cherrypick-bugfix-bitmap-filt…
lstruman Dec 16, 2025
befc8ca
GET supplementary can return precook telemetry data
lstruman Dec 17, 2025
9116ada
Merge pull request #298 from rdkcentral/james-dev
lstruman Dec 17, 2025
d880dad
Add support for kafka secure connection
lstruman Feb 4, 2026
ff48ad3
Merge pull request #299 from rdkcentral/james-dev
lstruman Feb 4, 2026
ed01365
Add support to allow skipping table creation during test
lstruman Feb 9, 2026
67cc750
Merge pull request #300 from rdkcentral/james-dev
lstruman Feb 9, 2026
742d2e2
Rollback changes for sqlite. Skipping table creation during tests is …
lstruman Feb 9, 2026
1ae9f26
Merge pull request #301 from rdkcentral/james-dev
lstruman Feb 9, 2026
1e2d01c
Update the sample Cassandra configuration to use a non-SSL connection
lstruman Feb 10, 2026
05ee124
Merge pull request #302 from rdkcentral/james-dev
lstruman Feb 10, 2026
72dee33
Revert "Update the sample Cassandra configuration to use a non-SSL co…
lstruman Feb 10, 2026
6a3ff5c
Merge pull request #303 from rdkcentral/james-dev
lstruman Feb 10, 2026
bc8cf47
Add cassandra config for tls as we upgraded the dependency libs in go…
lstruman Feb 11, 2026
25846da
Merge pull request #304 from rdkcentral/james-dev
lstruman Feb 11, 2026
524862b
Add tls configs to work with a targeted cassandra env
lstruman Feb 11, 2026
f532193
Merge pull request #305 from rdkcentral/james-dev
lstruman Feb 11, 2026
0892bd0
Fix a bug that wronge hocon paths wwere used to read kafka tls configs
lstruman Feb 11, 2026
86e43a1
Merge pull request #306 from rdkcentral/james-dev
lstruman Feb 11, 2026
5a41e78
Add back cassandra ciphersuite configs removed by mistake
lstruman Feb 11, 2026
c5796d3
Merge pull request #307 from rdkcentral/james-dev
lstruman Feb 11, 2026
b567031
Merge pull request #308 from rdkcentral/develop
lstruman Feb 12, 2026
2cf1f23
fix a bug that error_code and error_details columns were not reset wh…
lstruman Mar 18, 2026
6668e7f
Merge pull request #311 from rdkcentral/cherrypick-bugfix-state-reset
lstruman Mar 19, 2026
826c144
handle failed sqlite related tests during root_document schema change
lstruman Mar 19, 2026
163fe4a
Merge pull request #313 from rdkcentral/cherrypick-bugfix-state-reset
lstruman Mar 19, 2026
261241b
Store new headers X-System-Product-Class and X-System-Type into root_…
lstruman Mar 10, 2026
cdb6530
Add missing code for customer_type and product_class support
lstruman Mar 31, 2026
832fc2e
Merge pull request #316 from rdkcentral/cherrypick-header-x-system-type
lstruman Apr 17, 2026
c8f8113
rename column name from customer_type to account_type
lstruman Apr 17, 2026
a33ea4f
Merge pull request #318 from rdkcentral/cherrypick-support-account-type
lstruman Apr 23, 2026
43ac181
update dependencies based code scan advice
lstruman May 7, 2026
805c5a1
update dependencies based code scan advice
lstruman May 7, 2026
1c91abc
Merge pull request #321 from rdkcentral/cherrypick-update-dependencies
lstruman May 8, 2026
e5ed638
add a codeql.yml file
lstruman May 13, 2026
3083892
modify codeql.yml based on advice
lstruman May 13, 2026
164ac43
fix a bug that codeql.yml was put in a wrong directory
lstruman May 13, 2026
73033d1
update codeql.yml to pass the PR check
lstruman May 13, 2026
9df101b
Potential fix for pull request finding 'CodeQL / Clear-text logging o…
lstruman May 13, 2026
df0fb2f
Potential fix for pull request finding 'CodeQL / Clear-text logging o…
lstruman May 13, 2026
d1d7181
Potential fix for pull request finding 'CodeQL / Clear-text logging o…
lstruman May 13, 2026
386080b
Potential fix for pull request finding 'CodeQL / Clear-text logging o…
lstruman May 13, 2026
0c7d9a0
Potential fix for pull request finding 'CodeQL / Workflow does not co…
lstruman May 13, 2026
f3f60c5
Potential fix for pull request finding 'CodeQL / Clear-text logging o…
lstruman May 13, 2026
dbb2aad
Potential fix for pull request finding 'CodeQL / Clear-text logging o…
lstruman May 13, 2026
e98851e
Potential fix for pull request finding 'CodeQL / Clear-text logging o…
lstruman May 13, 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
30 changes: 30 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CodeQL

on:
pull_request:
push:
branches: [ main ]

permissions:
contents: read

jobs:
analyze:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- uses: github/codeql-action/init@v3
with:
languages: go # ✅ ONLY GO

- run: go build ./...

- uses: github/codeql-action/analyze@v3
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
with:
upload: false # ← ADD THIS LINE
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@
# Dependency directories (remove the comment below to include it)
# vendor/

# #####################
# ignored files
bin/*
.vscode/*
.env
*.sh

# Ignore OpenSpec generated files and folders
openspec/
.github/
.claude/
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ BUILDTIME := $(shell date -u +"%F_%T_%Z")
all: build
testall: test testsqlite testyuga

testenv: ## Run all tests sourcing env.sh for TEST_CONFIG_FILE
bash -c "source env.sh && go test ./... -cover -count=1"

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/${PROJ}-${GOOS}-${GOARCH} main.go

Expand Down
94 changes: 93 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Webconfig supports 2 types of transport between cloud and devices
2. mqtt

## Install go
This project is written and tested with Go **1.17**.
This project is written and tested with Go **1.21**.

## Build the binary
```shell
Expand Down Expand Up @@ -78,6 +78,98 @@ The actual kafka topic names can be any. Below is just an example. "topics" shou
}
```

#### Kafka TLS/SSL Configuration

Webconfig supports secure TLS/SSL connections to Kafka brokers for both consumers and producers. This is recommended for production environments to ensure data encryption in transit and proper authentication.

**TLS Configuration Options:**

- `tls.enabled` - Enable/disable TLS for Kafka connections (default: false)
- `tls.cert_file` - Path to client certificate file for mTLS authentication (optional)
- `tls.key_file` - Path to client private key file for mTLS authentication (optional)
- `tls.ca_cert_file` - Path to CA certificate file for broker verification (optional)
- `tls.insecure_skip_verify` - Skip certificate verification (insecure, for testing only, default: false)

**Consumer TLS Configuration Example:**

```shell
kafka {
enabled = true
brokers = "kafka-broker:9093" # Use secure port
topics = "config-version-report"
consumer_group = "webconfig"

tls {
enabled = true
cert_file = "/etc/webconfig/kafka/client.crt"
key_file = "/etc/webconfig/kafka/client.key"
ca_cert_file = "/etc/webconfig/kafka/ca.crt"
insecure_skip_verify = false
}

# Per-cluster TLS configuration
clusters {
mesh {
enabled = true
brokers = "kafka-mesh:9093"
topics = "staging-chi-onewifi-from-device"

tls {
enabled = true
cert_file = "/etc/webconfig/kafka/mesh-client.crt"
key_file = "/etc/webconfig/kafka/mesh-client.key"
ca_cert_file = "/etc/webconfig/kafka/mesh-ca.crt"
}
}
}
}
```

**Producer TLS Configuration Example:**

```shell
kafka_producer {
enabled = true
brokers = "kafka-broker:9093"
topic = "webconfig_downstream"

tls {
enabled = true
cert_file = "/etc/webconfig/kafka/producer-client.crt"
key_file = "/etc/webconfig/kafka/producer-client.key"
ca_cert_file = "/etc/webconfig/kafka/ca.crt"
}
}
```

**Certificate Requirements:**

1. **Client Certificate (mTLS)**: If `cert_file` and `key_file` are provided, mutual TLS authentication is enabled. The certificate and key must be in PEM format.

2. **CA Certificate**: If `ca_cert_file` is provided, it will be used to verify the Kafka broker's certificate. This is useful when using self-signed certificates or internal CAs.

3. **Certificate Validation**: All certificate files are validated at startup. The application will fail to start with clear error messages if:
- Certificate files are missing or unreadable
- Certificates are in invalid format
- Certificate and key don't match

**TLS Security Best Practices:**

1. **Use TLS in Production**: Always enable TLS for production Kafka connections to encrypt data in transit
2. **Use mTLS**: Provide client certificates (`cert_file` and `key_file`) for mutual authentication
3. **Verify Certificates**: Never use `insecure_skip_verify = true` in production - it disables certificate verification and is insecure
4. **Protect Certificate Files**: Set appropriate file permissions (0600) on certificate and key files
5. **Use Secure Ports**: Configure Kafka brokers to listen on secure ports (typically 9093 for TLS)
6. **Certificate Rotation**: Plan for certificate rotation - the service must be restarted to pick up new certificates

**Troubleshooting TLS Issues:**

- Check logs for TLS-related errors during startup
- Verify certificate file paths are correct and files are readable
- Ensure Kafka brokers are configured to accept TLS connections
- Test certificate validity: `openssl x509 -in client.crt -text -noout`
- Verify certificate and key match: `openssl x509 -noout -modulus -in client.crt | openssl md5` vs `openssl rsa -noout -modulus -in client.key | openssl md5`

### Configuration for database
The main database operations are defined as an interface. Any driver that implements the interface should work. We has implemented using sqlite, cassandra and yugabytedb. After the db is properly configured, the dbinit.cql can be used to create the tables for cassandra.

Expand Down
173 changes: 173 additions & 0 deletions common/bitmap.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
/**
* Copyright 2021 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
package common

// header X-System-Supported-Docs
type BitMaskTuple struct {
GroupBit int
CpeBit int
}

// The group based bitmaps will be merged into 1 cpe bitmap
// 1: []BitMaskTuple{ // meta_group_id: defined by RDK
//
// BitMaskTuple{1, 1}, // {"index_of_bit_from_lsb" for a group bitmap, "index_of_bit_from_lsb" for the cpe bitmap
var (
SupportedDocsBitMaskMap = map[int][]BitMaskTuple{
1: {
{1, 1},
{2, 2},
{3, 3},
{4, 4},
{5, 5},
{6, 6},
{7, 29}, // connectedbuilding
{8, 35}, // xmspeedboost
{9, 40}, // webui
},
2: {
{1, 7},
{2, 8},
{3, 9},
},
3: {
{1, 10},
},
4: {
{1, 11},
},
5: {
{1, 12},
},
6: {
{1, 13}, // mesh
{2, 31}, // clienttosteeringprofile
{3, 36}, // meshsteeringprofiles
{4, 37}, // wifistatsconfig
{5, 38}, // mwoconfigs
{6, 39}, // interference
{7, 34}, // wifimotionsettings
{8, 41}, // channelplan
},
7: {
{1, 14},
},
8: {
{1, 15},
{2, 32},
{3, 33},
},
9: {
{1, 16},
{2, 17},
},
10: {
{1, 18},
{2, 19},
},
11: {
{1, 20},
{2, 25},
},
12: {
{1, 21},
{2, 23},
},
13: {
{1, 22},
},
14: {
{1, 24},
},
15: {
{1, 26},
{2, 27},
},
16: {
{1, 28},
},
17: {
{1, 30},
},
}
)

var (
SubdocBitIndexMap = map[string]int{
"portforwarding": 1,
"lan": 2,
"wan": 3,
"macbinding": 4,
"hotspot": 5,
"bridge": 6,
"privatessid": 7,
"homessid": 8,
"radio": 9,
"moca": 10,
"xdns": 11,
"advsecurity": 12,
"mesh": 13,
"aker": 14,
"telemetry": 15,
"statusreport": 16,
"trafficreport": 17,
"interfacereport": 18,
"radioreport": 19,
"telcovoip": 20,
"wanmanager": 21,
"voiceservice": 22,
"wanfailover": 23,
"cellularconfig": 24,
"telcovoice": 25,
"gwfailover": 26,
"gwrestore": 27,
"prioritizedmacs": 28,
"connectedbuilding": 29,
"lldqoscontrol": 30,
"clienttosteeringprofile": 31,
"defaultrfc": 32,
"rfc": 33,
"wifimotionsettings": 34,
"xmspeedboost": 35,
"meshsteeringprofiles": 36,
"wifistatsconfig": 37,
"mwoconfigs": 38,
"interference": 39,
"webui": 40,
"channelplan": 41,
}
)

func GetDefaultSupportedSubdocMap() map[string]bool {
m := make(map[string]bool)
for k := range SubdocBitIndexMap {
m[k] = false
}
return m
}

func BuildSupportedSubdocMapWithDefaults(supportedSubdocIds []string) map[string]bool {
m := make(map[string]bool)
for k := range SubdocBitIndexMap {
m[k] = false
}
for _, s := range supportedSubdocIds {
m[s] = true
}
return m
}
47 changes: 47 additions & 0 deletions common/bitmap_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* Copyright 2021 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
package common

import (
"slices"
"testing"

"gotest.tools/assert"
)

func TestGetDefaultSupportedSubdocMap(t *testing.T) {
m := GetDefaultSupportedSubdocMap()
assert.Equal(t, len(m), len(SubdocBitIndexMap))
}

func TestBuildSupportedSubdocMapWithDefaults(t *testing.T) {
supportedSubdocIds := []string{
"lan",
"wan",
"macbinding",
"hotspot",
"privatessid",
}
m := BuildSupportedSubdocMapWithDefaults(supportedSubdocIds)
assert.Equal(t, len(m), len(SubdocBitIndexMap))
for k := range m {
if m[k] {
assert.Assert(t, slices.Contains(supportedSubdocIds, k))
}
}
}
Loading
Loading