Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
429 commits
Select commit Hold shift + click to select a range
7b9d34a
improve: use console version for gateway and agent
hardy-dev-infinilabs May 30, 2026
70d232d
improve: set license permision for every one
hardy-dev-infinilabs May 30, 2026
91b9005
improve: sync and link path
hardy-dev-infinilabs May 30, 2026
56d2670
improve: profile with permision change
hardy-dev-infinilabs May 30, 2026
45173fc
fix: skip init lost infini-ingest password
hardy-dev-infinilabs May 30, 2026
caaecc8
fix: clean credention by delete agent
hardy-dev-infinilabs May 30, 2026
82c040c
improve: edpoint with schema and log debug reduce
hardy-dev-infinilabs May 30, 2026
50124d8
improve: log reduce with error user login
hardy-dev-infinilabs May 30, 2026
d2a0079
improve: monitor log reduce with error user login
hardy-dev-infinilabs May 30, 2026
fed761f
improve: default close access log
hardy-dev-infinilabs May 31, 2026
cb2c8c0
improve: add tpl default access log setting
hardy-dev-infinilabs May 31, 2026
8d78bc1
improve: reduce log out
hardy-dev-infinilabs May 31, 2026
a34f6ad
improve: reduce log out with mask
hardy-dev-infinilabs May 31, 2026
a9c53dd
improve: check with agent legency
hardy-dev-infinilabs May 31, 2026
1135388
improve: legence agent register for console
hardy-dev-infinilabs May 31, 2026
3cf98d2
improve: credention select manul first
hardy-dev-infinilabs May 31, 2026
1a3b144
improve: registry result style for cluster
hardy-dev-infinilabs May 31, 2026
596ab5a
improve: lengecy agent registry and sync
hardy-dev-infinilabs May 31, 2026
4fdd45f
fix: legence agent auth faile
hardy-dev-infinilabs May 31, 2026
94f12c2
fix: legence agent auth faile with register
hardy-dev-infinilabs May 31, 2026
d93a0c9
fix: legence agent auth faile with register for log
hardy-dev-infinilabs May 31, 2026
63e239a
fix: legence agent auth faile with register with out client
hardy-dev-infinilabs May 31, 2026
7a098f8
improve: add agent version
hardy-dev-infinilabs Jun 1, 2026
de2c5dd
improve: unify agent compare version
hardy-dev-infinilabs Jun 1, 2026
aad241b
improve: update test files for test
hardy-dev-infinilabs Jun 1, 2026
51c74fd
improve: log with mask info
hardy-dev-infinilabs Jun 1, 2026
d504cd7
fix: node overview with indices
hardy-dev-infinilabs Jun 1, 2026
f117ed0
fix: node overview with indices for node
hardy-dev-infinilabs Jun 1, 2026
3b8c53e
fix: node overview with indices for node with agent
hardy-dev-infinilabs Jun 1, 2026
da47f1f
fix: node overview with indices for node with agent
hardy-dev-infinilabs Jun 1, 2026
cc876ff
fix: ui work well with test
hardy-dev-infinilabs Jun 1, 2026
5ee9cf0
fix: ui work well with test and log mask
hardy-dev-infinilabs Jun 1, 2026
1b3b12e
fix: ui work well with test and log mask and anchor scroll
hardy-dev-infinilabs Jun 1, 2026
2522f65
fix: ui anchor scroll and pause without increment task
hardy-dev-infinilabs Jun 1, 2026
af6b046
fix: svg align center with clean search
hardy-dev-infinilabs Jun 1, 2026
4996248
fix: svg align center with clean search input
hardy-dev-infinilabs Jun 1, 2026
bea1488
fix: migration pause with increase task
hardy-dev-infinilabs Jun 1, 2026
c12d90f
fix: clean with search input
hardy-dev-infinilabs Jun 1, 2026
25915cf
fix: achor and repeat task with migration
hardy-dev-infinilabs Jun 1, 2026
4117440
fix: achor postion and repeat task with migration
hardy-dev-infinilabs Jun 1, 2026
3c9045a
fix: repeat task with migration pause
hardy-dev-infinilabs Jun 1, 2026
b3c328f
fix: index advance error by select index
hardy-dev-infinilabs Jun 2, 2026
cc20140
improve: some page optimize and legacy login
hardy-dev-infinilabs Jun 2, 2026
08c6ba1
improve: smtp faile with info define
hardy-dev-infinilabs Jun 2, 2026
86830e3
improve: node advance and anchor smool
hardy-dev-infinilabs Jun 2, 2026
f5ac84f
improve: achor style with tab
hardy-dev-infinilabs Jun 2, 2026
7f90f10
fix: migration can't stop with arm64
hardy-dev-infinilabs Jun 2, 2026
01f40d7
fix: migration with pause and resume
hardy-dev-infinilabs Jun 2, 2026
4c4b68d
improve: lock cloumn for cluster
hardy-dev-infinilabs Jun 2, 2026
4721bc0
improve: license trial for console bridge
hardy-dev-infinilabs Jun 2, 2026
9764f09
improve: refresh button update by size
hardy-dev-infinilabs Jun 2, 2026
74bf9fd
improve: login with upgrade
hardy-dev-infinilabs Jun 2, 2026
e31c01e
improve: login with upgrade test
hardy-dev-infinilabs Jun 2, 2026
dc1a5ea
improve: discover with time field
hardy-dev-infinilabs Jun 2, 2026
0c7255a
improve: repeat task with rerun and query dsl
hardy-dev-infinilabs Jun 2, 2026
b175708
improve: repeat task with compare
hardy-dev-infinilabs Jun 2, 2026
d4d3297
improve: repeat task with compare
hardy-dev-infinilabs Jun 2, 2026
0ca48da
improve: fit the node name
hardy-dev-infinilabs Jun 2, 2026
ceb2fc2
improve: partion task with blank task and rerun
hardy-dev-infinilabs Jun 2, 2026
9643cb2
improve: agent token for register
hardy-dev-infinilabs Jun 2, 2026
f02fef6
improve: agent with token
hardy-dev-infinilabs Jun 3, 2026
1b15b0a
improve: agent register info
hardy-dev-infinilabs Jun 3, 2026
1ea6129
improve: task pause and resume and widget error fix
hardy-dev-infinilabs Jun 3, 2026
376484f
improve: task status with pause and alerting
hardy-dev-infinilabs Jun 3, 2026
5da0b65
improve: remove reload ts for refresh
hardy-dev-infinilabs Jun 3, 2026
67885e9
improve: alert message with webhook
hardy-dev-infinilabs Jun 3, 2026
6d4e5ec
improve: view incident with resolve_at
hardy-dev-infinilabs Jun 3, 2026
0fb95aa
improve: use no emoji tile
hardy-dev-infinilabs Jun 3, 2026
b6b9812
improve: remove double emoji
hardy-dev-infinilabs Jun 3, 2026
ccf682c
fix: resolve time for message
hardy-dev-infinilabs Jun 3, 2026
76c229c
fix: alerting message with resolvedAt
hardy-dev-infinilabs Jun 3, 2026
3158c31
fix: alerting message with resolvedAt
hardy-dev-infinilabs Jun 3, 2026
9d75f62
fix: alerting message with incrementtal recovery
hardy-dev-infinilabs Jun 4, 2026
cd5a320
fix: pause with task and resume
hardy-dev-infinilabs Jun 4, 2026
107178c
fix: recovery for system password change
hardy-dev-infinilabs Jun 5, 2026
56dc784
improve: alert channel sort by type
hardy-dev-infinilabs Jun 5, 2026
7549720
fix: alert message content
hardy-dev-infinilabs Jun 5, 2026
57163a9
improve: copy exists tasks
hardy-dev-infinilabs Jun 6, 2026
abdc00b
fix: enroll with no auth and event detail end time
hardy-dev-infinilabs Jun 7, 2026
2a1a656
fix: enroll with inner publish address
hardy-dev-infinilabs Jun 7, 2026
1203b6f
improve: update filter with inline
hardy-dev-infinilabs Jun 7, 2026
7837654
fix: enroll with no need credential
hardy-dev-infinilabs Jun 9, 2026
d45e6bb
fix: node left and join with metadata update
hardy-dev-infinilabs Jun 9, 2026
f3a99d7
fix: unify with emoji for alert title
hardy-dev-infinilabs Jun 9, 2026
9f5e131
improve: i18n for nodata
hardy-dev-infinilabs Jun 9, 2026
8c8bfbf
fix: hide task and remove node alert with time range
hardy-dev-infinilabs Jun 10, 2026
b40f354
fix: replace null time range with match all
hardy-dev-infinilabs Jun 10, 2026
a160607
fix: alert number click search
hardy-dev-infinilabs Jun 10, 2026
0cf2e11
feat: relay with gateway
hardy-dev-infinilabs Jun 10, 2026
a968f2a
fix: common alert with the health activity change
hardy-dev-infinilabs Jun 11, 2026
e89fc74
fix: gateway relay as config server and typo to service type
hardy-dev-infinilabs Jun 11, 2026
113ae5c
fix: only guide reject red cluster
hardy-dev-infinilabs Jun 11, 2026
8e7d951
chore: typo the service type
hardy-dev-infinilabs Jun 11, 2026
36094fa
fix: config server for gateway
hardy-dev-infinilabs Jun 11, 2026
cc4630b
fix: config server and relay metrics
hardy-dev-infinilabs Jun 11, 2026
87f353d
improve: use mTLS with angent to gateway relay
hardy-dev-infinilabs Jun 11, 2026
db46cc9
fix: use entry network binding port
hardy-dev-infinilabs Jun 11, 2026
b0dfb2e
fix: index recorded and metadata twice to activity
hardy-dev-infinilabs Jun 11, 2026
d3503ab
fix: use system cluster credentials for relay gateway elasticsearch c…
hardy-dev-infinilabs Jun 11, 2026
c0dbb13
feat: enable elastic module in relay gateway to refresh cluster metadata
hardy-dev-infinilabs Jun 11, 2026
2194b74
Revert "feat: enable elastic module in relay gateway to refresh clust…
hardy-dev-infinilabs Jun 11, 2026
4510981
feat: enable elastic module in relay gateway to refresh cluster metadata
hardy-dev-infinilabs Jun 11, 2026
574b9ac
fix: use system elasticsearch name in relay gateway config
hardy-dev-infinilabs Jun 11, 2026
2258676
fix: disallow localhost addresses during cluster registration
hardy-dev-infinilabs Jun 11, 2026
df94663
fix: add lowercase validation for index names in create modal
hardy-dev-infinilabs Jun 11, 2026
8816bbd
i18n: localize index name lowercase validation message
hardy-dev-infinilabs Jun 11, 2026
452c0be
feat: add cluster name column and inline display to platform overview
hardy-dev-infinilabs Jun 11, 2026
fffabb4
chore: use native for framwork rbac
hardy-dev-infinilabs Jun 11, 2026
892d4f1
fix: build error with permissions
hardy-dev-infinilabs Jun 11, 2026
5ecf775
fix: gateway install tpl with metadata refresh
hardy-dev-infinilabs Jun 11, 2026
49fd1c3
fix: the listview scroll and cluster svg middle
hardy-dev-infinilabs Jun 11, 2026
af6d6cf
fix: add continue_metadata_missing for data
hardy-dev-infinilabs Jun 11, 2026
6952e23
improve: gateway install with menu
hardy-dev-infinilabs Jun 11, 2026
d41ab55
improve: add monitored for metadata refresh
hardy-dev-infinilabs Jun 11, 2026
14cac26
improve: install gatewway with menu
hardy-dev-infinilabs Jun 11, 2026
024f92a
improve: install gatewway with menu
hardy-dev-infinilabs Jun 11, 2026
db3df53
fix: alias privileges for ingest
hardy-dev-infinilabs Jun 11, 2026
754a1bf
improve: hide notify for message
hardy-dev-infinilabs Jun 11, 2026
2a1965f
improve: sytle with new agent
hardy-dev-infinilabs Jun 11, 2026
656cd53
improve: agent collect inteval setting
hardy-dev-infinilabs Jun 12, 2026
bb9fe92
improve: chart flow with history
hardy-dev-infinilabs Jun 12, 2026
ae90ba7
improve: guide with initial the easysearch address
hardy-dev-infinilabs Jun 12, 2026
fa2aa1e
improve: devtools with float with scroll
hardy-dev-infinilabs Jun 12, 2026
fd6cc11
improve: add permisson for route
hardy-dev-infinilabs Jun 12, 2026
f9c4500
improve: ui with search trim
hardy-dev-infinilabs Jun 12, 2026
a100d8e
improve: ui with icom
hardy-dev-infinilabs Jun 12, 2026
94988f1
improve: metadata sync increasement
hardy-dev-infinilabs Jun 12, 2026
48907f3
improve: commond svg use tool
hardy-dev-infinilabs Jun 12, 2026
bf39c25
fix: index delete docs
hardy-dev-infinilabs Jun 12, 2026
0dd7fac
improve: alert chart card
hardy-dev-infinilabs Jun 12, 2026
e09bfc8
improve: search style with primary
hardy-dev-infinilabs Jun 12, 2026
eceafa3
fix: use same field for alert
hardy-dev-infinilabs Jun 12, 2026
22504f3
fix: alert chart copy dsl
hardy-dev-infinilabs Jun 12, 2026
cb3ed68
fix: alert rule save
hardy-dev-infinilabs Jun 12, 2026
4451917
fix: smtp with error detail
hardy-dev-infinilabs Jun 12, 2026
f576343
fix: rule import with example
hardy-dev-infinilabs Jun 12, 2026
57b5988
improve: update the message style
hardy-dev-infinilabs Jun 12, 2026
69e90dd
fix: agent eroll schema with cluster
hardy-dev-infinilabs Jun 12, 2026
159b400
overview: default rows for show
hardy-dev-infinilabs Jun 12, 2026
11746b3
fix: alert update time show
hardy-dev-infinilabs Jun 12, 2026
bd34381
fix: agent enroll schema
hardy-dev-infinilabs Jun 12, 2026
bb3e30c
fix: alert chart copy dsl
hardy-dev-infinilabs Jun 12, 2026
5403ce6
improve: rule charts with alert history
hardy-dev-infinilabs Jun 12, 2026
ee25c22
fix: add orm context for crud
hardy-dev-infinilabs Jun 12, 2026
1ab2cf0
improve: recovery with bootstrap token for agent
hardy-dev-infinilabs Jun 12, 2026
dd7e9f2
improve: view message and add switch info
hardy-dev-infinilabs Jun 13, 2026
32208af
improve: datepicker and data histogram with min doc count
hardy-dev-infinilabs Jun 13, 2026
6c878a5
fix: datepicker auto object error
hardy-dev-infinilabs Jun 13, 2026
ca33336
fix: datepicker auto object error and style change
hardy-dev-infinilabs Jun 13, 2026
a064b20
fix: datepicker show width
hardy-dev-infinilabs Jun 13, 2026
c953d7e
fix: activities with fill value
hardy-dev-infinilabs Jun 13, 2026
0ac7cc2
fix: bucket size with shard fanout
hardy-dev-infinilabs Jun 13, 2026
00852d9
fix: show auto time range with monitor
hardy-dev-infinilabs Jun 13, 2026
e32da70
improvae: width with cluster select
hardy-dev-infinilabs Jun 13, 2026
e183597
fix: auto with metrics search
hardy-dev-infinilabs Jun 13, 2026
c37d122
fix: auto with metrics search only
hardy-dev-infinilabs Jun 13, 2026
11b648d
fix: alert with dsl copy
hardy-dev-infinilabs Jun 13, 2026
80f6203
fix: table page size to 20
hardy-dev-infinilabs Jun 13, 2026
b82cc6e
fix: table page size to 20
hardy-dev-infinilabs Jun 13, 2026
5162932
fix: auto param for metrics query
hardy-dev-infinilabs Jun 13, 2026
7d20d70
fix: pagesize with search
hardy-dev-infinilabs Jun 13, 2026
2aa1a6f
fix: shard state with agent
hardy-dev-infinilabs Jun 13, 2026
5d14002
fix: shard state with not data node
hardy-dev-infinilabs Jun 13, 2026
3c025a8
fix: reverse channel agent connect directory
hardy-dev-infinilabs Jun 13, 2026
ec5533a
fix: some optimize with buckets and auto
hardy-dev-infinilabs Jun 13, 2026
99fbd1e
chore: update alert template
hardy-dev-infinilabs Jun 13, 2026
060e8a5
fix: user auto with search
hardy-dev-infinilabs Jun 13, 2026
01bdc60
chore: add icon for button
hardy-dev-infinilabs Jun 13, 2026
5bc0835
chore: use 15m for date default
hardy-dev-infinilabs Jun 13, 2026
0d5b73c
improve: service for gateway different
hardy-dev-infinilabs Jun 14, 2026
647ecd6
improve: code format
hardy-dev-infinilabs Jun 14, 2026
2b689b2
improve: use single query for 10 records
hardy-dev-infinilabs Jun 14, 2026
8be9a3c
fix: metrics search for auto
hardy-dev-infinilabs Jun 14, 2026
4e228c4
fix: metrics search build error
hardy-dev-infinilabs Jun 14, 2026
df212d6
improve: use auto for datepicker
hardy-dev-infinilabs Jun 14, 2026
ad45f94
improve: email tpl with zh cn
hardy-dev-infinilabs Jun 14, 2026
253cd32
fix: auto time range for search
hardy-dev-infinilabs Jun 14, 2026
407e576
fix: cluster uuid as uniqe for update
hardy-dev-infinilabs Jun 14, 2026
c072eb4
fix: use auto date histogram
hardy-dev-infinilabs Jun 14, 2026
f3fcabb
fix: use auto date histogram and reufse connection for migration
hardy-dev-infinilabs Jun 14, 2026
72bcb40
fix: index count zero
hardy-dev-infinilabs Jun 14, 2026
2393770
fix: index count zero and import button
hardy-dev-infinilabs Jun 14, 2026
9e441e9
fix: add cluster left alerting
hardy-dev-infinilabs Jun 14, 2026
574f6cc
fix: ignore time range for alerting
hardy-dev-infinilabs Jun 14, 2026
0c3b160
fix: audit with cluster name
hardy-dev-infinilabs Jun 14, 2026
91f9c42
fix: try connect with no nance
hardy-dev-infinilabs Jun 14, 2026
d293bb5
chore: add placeholder for charts
hardy-dev-infinilabs Jun 14, 2026
a9c14e4
fix: global cluster select width 400
hardy-dev-infinilabs Jun 14, 2026
de5b1f9
fix: alert update time to save
hardy-dev-infinilabs Jun 14, 2026
7775557
fix: alert message with trigger at time
hardy-dev-infinilabs Jun 14, 2026
6ac47ff
fix: migration type select
hardy-dev-infinilabs Jun 14, 2026
6f32518
chore: remove hard limit for localhost
medcl Jun 14, 2026
472c7b2
chore: not localhost limit in setup
medcl Jun 14, 2026
094a919
chore: update date histgram
medcl Jun 14, 2026
694e582
chore: fix alertings
medcl Jun 14, 2026
a81fbd5
chore: fix templates
medcl Jun 14, 2026
19bf02f
fix: add wait for by save
hardy-dev-infinilabs Jun 14, 2026
305faaa
fix: rule updated update
hardy-dev-infinilabs Jun 14, 2026
1b7e187
fix: add metrics chart for placeholder
hardy-dev-infinilabs Jun 14, 2026
7689c25
fix: trigger at time with detail
hardy-dev-infinilabs Jun 14, 2026
0eb643c
fix: command and activiti load
hardy-dev-infinilabs Jun 14, 2026
9918bd6
fix: size for table mode with overview
hardy-dev-infinilabs Jun 15, 2026
1da806b
fix: agent credential enroll
hardy-dev-infinilabs Jun 15, 2026
4873642
fix: agent credential enroll error
hardy-dev-infinilabs Jun 15, 2026
ac559ff
fix: alert trigger at time and no data
hardy-dev-infinilabs Jun 15, 2026
a00a840
improve: update the host avaliable check
hardy-dev-infinilabs Jun 15, 2026
e6fa06a
improve: restore gateway register to console
hardy-dev-infinilabs Jun 15, 2026
97ac0cb
improve: alert message created and updated
hardy-dev-infinilabs Jun 15, 2026
6fba80a
improve: overview switch with size
hardy-dev-infinilabs Jun 15, 2026
223ba93
chore: update i8n
medcl Jun 15, 2026
05250d9
improve: overview index with nil
hardy-dev-infinilabs Jun 15, 2026
62d50d0
improve: alert message the updated with incident
hardy-dev-infinilabs Jun 15, 2026
805debc
chore: update to use auto date histgram
medcl Jun 15, 2026
2d96264
Merge branch 'optimize_pages' of github.com:infinilabs/console into o…
medcl Jun 15, 2026
ea9ec32
improve: reduce log with enroll check cluster uuid
hardy-dev-infinilabs Jun 16, 2026
7db6cde
improve: gateway role for relay
hardy-dev-infinilabs Jun 16, 2026
109f4f6
chore: rollback with normalize rollup metric index name
hardy-dev-infinilabs Jun 16, 2026
2631053
chore: prefer to use auto date histgram
medcl Jun 16, 2026
13b7059
chore: merge code
medcl Jun 16, 2026
2079da2
chore: update config
medcl Jun 16, 2026
3c93db8
improve: use safe duration
hardy-dev-infinilabs Jun 16, 2026
9f38e24
chore: revert auto date histgram
medcl Jun 16, 2026
86f37a4
Merge branch 'optimize_pages' of github.com:infinilabs/console into o…
medcl Jun 16, 2026
a369645
chore: enable overall metrics
medcl Jun 16, 2026
a6fc106
improve: add get all endpoints
hardy-dev-infinilabs Jun 16, 2026
8d3567a
fix: add hots for setup
hardy-dev-infinilabs Jun 16, 2026
9039458
fix: element for array with quote
hardy-dev-infinilabs Jun 16, 2026
4074d3f
fix: total results with alert gt
hardy-dev-infinilabs Jun 16, 2026
e2d0dac
fix: trigger at time
hardy-dev-infinilabs Jun 16, 2026
30b624f
fix: alias with the write index
hardy-dev-infinilabs Jun 16, 2026
97c9f61
fix: kql with try catch
hardy-dev-infinilabs Jun 16, 2026
70c6333
fix: alias save with easysearch
hardy-dev-infinilabs Jun 16, 2026
c180d71
fix: kql token query error
hardy-dev-infinilabs Jun 16, 2026
e17e482
fix: overview with rollup
hardy-dev-infinilabs Jun 16, 2026
3f56d8a
fix: save alert message with updated now
hardy-dev-infinilabs Jun 17, 2026
f8ac571
fix: duration with updated time calc
hardy-dev-infinilabs Jun 17, 2026
899bedf
fix: just warn for console use elasticsearch
hardy-dev-infinilabs Jun 22, 2026
6e082ef
fix: recovery with endpoints
hardy-dev-infinilabs Jun 26, 2026
3f256f6
fix: ldap login and discover hilight
hardy-dev-infinilabs Jul 11, 2026
9cf975e
fix: highlight for search by discover
hardy-dev-infinilabs Jul 11, 2026
9647d67
fix: query suggest by discover
hardy-dev-infinilabs Jul 11, 2026
e09e86b
chore: add audit with index operator and user enable/disable
hardy-dev-infinilabs Jul 27, 2026
0ef94c7
fix: setup with use enabled and remove token
hardy-dev-infinilabs Jul 28, 2026
b3f7e37
chore: code format and audit with user and role
hardy-dev-infinilabs Jul 29, 2026
67d957a
fix: audit role and user build error
hardy-dev-infinilabs Jul 29, 2026
6bb79cc
fix: security api with token
hardy-dev-infinilabs Aug 7, 2026
3d6851a
fix: api token with api
hardy-dev-infinilabs Aug 7, 2026
280b518
chore: add missing file with permission
hardy-dev-infinilabs Aug 8, 2026
0affbc1
fix: token with copy
hardy-dev-infinilabs Aug 8, 2026
d397d00
fix: token with api expire date
hardy-dev-infinilabs Aug 8, 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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ config/generated.go
config/generat*.go
config/initialization.dsl
config/system_config.yml
plugin/enterprise
/plugin/enterprise/
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ SHELL=/bin/bash
APP_NAME := console
APP_VERSION := 1.0.0_SNAPSHOT
APP_CONFIG := $(APP_NAME).yml
APP_EOLDate ?= "2026-12-31T10:10:10Z"
APP_EOLDate ?= "2027-12-31T10:10:10Z"
APP_STATIC_FOLDER := .public
APP_STATIC_PACKAGE := public
APP_UI_FOLDER := ui
APP_PLUGIN_FOLDER := plugin
GOBUILD_FLAGS += -trimpath

# easyjson -all domain.go
include ../framework/Makefile
Expand Down Expand Up @@ -45,6 +46,16 @@ web-lint:
@(cd web && npx eslint . --ext .js,.jsx,.ts,.tsx)
@echo "Linting complete."

.PHONY: format format-ci
format: format-ci

format-ci:
@echo "formatting code"
@find . -type f -name '*.go' \
-not -path './vendor/*' \
-not -path './.git/*' \
-print0 | xargs -0 gofmt -w

# Build the web app
build-web:
@echo "Building the web app..."
Expand Down
55 changes: 55 additions & 0 deletions common/info.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright (C) INFINI Labs & INFINI LIMITED.
//
// The INFINI Console is offered under the GNU Affero General Public License v3.0
// and as commercial software.
//
// For commercial licensing, contact us at:
// - Website: infinilabs.com
// - Email: hello@infini.ltd
//
// Open Source licensed under AGPL V3:
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

package common

import "infini.sh/framework/core/util"

var allowedInstanceInfoKeys = []string{
"id",
"name",
"application",
"labels",
"tags",
"description",
"status",
}

func SanitizeInstanceInfoMap(payload util.MapStr) util.MapStr {
sanitized := util.MapStr{}
for _, key := range allowedInstanceInfoKeys {
if value, ok := payload[key]; ok {
sanitized[key] = value
}
}
return sanitized
}

func SanitizeInstanceInfoBytes(body []byte) ([]byte, error) {
payload := util.MapStr{}
err := util.FromJSONBytes(body, &payload)
if err != nil {
return nil, err
}
return util.MustToJSONBytes(SanitizeInstanceInfoMap(payload)), nil
}
37 changes: 37 additions & 0 deletions common/info_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package common

import (
"testing"

"infini.sh/framework/core/util"
)

func TestSanitizeInstanceInfoMap(t *testing.T) {
payload := util.MapStr{
"id": "node-1",
"name": "console-a",
"application": util.MapStr{"name": "console"},
"endpoint": "http://127.0.0.1:2900",
"host": util.MapStr{"name": "host-a"},
"network": util.MapStr{"ip": []string{"10.0.0.1"}},
"basic_auth": util.MapStr{"username": "admin"},
}

sanitized := SanitizeInstanceInfoMap(payload)

if sanitized["id"] != "node-1" {
t.Fatalf("expected id to be preserved, got %v", sanitized["id"])
}
if _, ok := sanitized["endpoint"]; ok {
t.Fatalf("expected endpoint to be removed")
}
if _, ok := sanitized["host"]; ok {
t.Fatalf("expected host to be removed")
}
if _, ok := sanitized["network"]; ok {
t.Fatalf("expected network to be removed")
}
if _, ok := sanitized["basic_auth"]; ok {
t.Fatalf("expected basic_auth to be removed")
}
}
81 changes: 81 additions & 0 deletions common/log_redaction.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package common

import (
"net"
"net/url"
"regexp"
"strings"
)

var (
// urlInStringRegex matches http(s)://host:port or http(s)://host embedded in a longer string.
urlInStringRegex = regexp.MustCompile(`(https?://)([^/:"\s]+)(:[0-9]+)?`)
// dialTCPRegex matches "dial tcp host:port" patterns in Go network error messages.
dialTCPRegex = regexp.MustCompile(`(dial tcp )([^:"\s]+)(:[0-9]+)`)
)

// MaskLogError returns the error message with any embedded host/IP addresses redacted.
func MaskLogError(err error) string {
if err == nil {
return "<nil>"
}
msg := err.Error()
msg = urlInStringRegex.ReplaceAllString(msg, "${1}***${3}")
msg = dialTCPRegex.ReplaceAllString(msg, "${1}***${3}")
return msg
}

func MaskLogToken(value string) string {
if value == "" {
return "<empty>"
}

if len(value) <= 4 {
return "***"
}

if len(value) <= 8 {
return value[:1] + "***" + value[len(value)-1:]
}

return value[:2] + "***" + value[len(value)-2:]
}

func MaskLogHost(value string) string {
value = strings.TrimSpace(value)
if value == "" {
return "<empty>"
}

_, port, err := net.SplitHostPort(value)
if err == nil {
return "***:" + port
}

return "***"
}

func MaskLogEndpoint(value string) string {
value = strings.TrimSpace(value)
if value == "" {
return "<empty>"
}

parsed, err := url.Parse(value)
if err == nil && parsed.Host != "" {
host := "***"
if port := parsed.Port(); port != "" {
host += ":" + port
}
if parsed.Scheme != "" {
return parsed.Scheme + "://" + host
}
return host
}

if strings.Contains(value, "://") {
return "***"
}

return MaskLogHost(value)
}
113 changes: 113 additions & 0 deletions common/log_redaction_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
package common

import (
"fmt"
"testing"
)

func TestMaskLogError(t *testing.T) {
testCases := []struct {
name string
input string
expect string
}{
{
name: "nil error",
input: "",
expect: "<nil>",
},
{
name: "url in get error",
input: `request error: Get "http://192.168.3.8:8080/elasticsearch/node/_discovery": dial tcp 192.168.3.8:8080: connect: connection refused`,
expect: `request error: Get "http://***:8080/elasticsearch/node/_discovery": dial tcp ***:8080: connect: connection refused`,
},
{
name: "https url",
input: `Post "https://10.0.0.1:9200/_bulk": connection refused`,
expect: `Post "https://***:9200/_bulk": connection refused`,
},
{
name: "no sensitive data",
input: "index out of range",
expect: "index out of range",
},
}

for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
if tc.name == "nil error" {
if actual := MaskLogError(nil); actual != tc.expect {
t.Fatalf("unexpected result, got %q want %q", actual, tc.expect)
}
return
}
err := fmt.Errorf("%s", tc.input)
if actual := MaskLogError(err); actual != tc.expect {
t.Fatalf("unexpected masked error, got %q want %q", actual, tc.expect)
}
})
}
}

func TestMaskLogToken(t *testing.T) {
testCases := []struct {
name string
input string
expect string
}{
{name: "empty", input: "", expect: "<empty>"},
{name: "short", input: "abcd", expect: "***"},
{name: "medium", input: "abcdefgh", expect: "a***h"},
{name: "long", input: "d8de63bhalhmmus1n7k0", expect: "d8***k0"},
}

for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
if actual := MaskLogToken(tc.input); actual != tc.expect {
t.Fatalf("unexpected masked token, got %q want %q", actual, tc.expect)
}
})
}
}

func TestMaskLogHost(t *testing.T) {
testCases := []struct {
name string
input string
expect string
}{
{name: "empty", input: "", expect: "<empty>"},
{name: "ipv4 hostport", input: "127.0.0.1:9200", expect: "***:9200"},
{name: "ipv6 hostport", input: "[::1]:9200", expect: "***:9200"},
{name: "plain host", input: "node-1.internal", expect: "***"},
}

for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
if actual := MaskLogHost(tc.input); actual != tc.expect {
t.Fatalf("unexpected masked host, got %q want %q", actual, tc.expect)
}
})
}
}

func TestMaskLogEndpoint(t *testing.T) {
testCases := []struct {
name string
input string
expect string
}{
{name: "empty", input: "", expect: "<empty>"},
{name: "http endpoint", input: "http://192.168.3.185:8080", expect: "http://***:8080"},
{name: "https ipv6 endpoint", input: "https://[2001:db8::1]:9200", expect: "https://***:9200"},
{name: "host port", input: "127.0.0.1:9200", expect: "***:9200"},
}

for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
if actual := MaskLogEndpoint(tc.input); actual != tc.expect {
t.Fatalf("unexpected masked endpoint, got %q want %q", actual, tc.expect)
}
})
}
}
Loading
Loading