Sec-Tokens Update¶
Update a security token.
Usage¶
s10k sec-tokens update [-rR] -id=tokenId [-n=<name>]
[-D=<description>] [-node=nodeId[,nodeId...]]...
[-source=sourceId[,sourceId...]]...
[-N=metaPath[,metaPath...]]...
[-U=metaPath[,metaPath...]]...
[-A=path[,path...]]...
[-exp=<expirationDate>] [-tz=<zone>]
[-mode=<displayMode>]
[-a | -d]
[-agg=aggregation |
--aggregation=aggregation[,aggregation...]...]
[-loc=precision |
--location-precision=precision[,precision...]...]
Options¶
Output¶
The updated security token.
Examples¶
Update the name and description of a token:
s10k sec-tokens update --identifier hNAdH.aXHaEqFossMwT8 \
--name 'Student access' \
--description 'Allow access to school system data.'
+----------------------+-----------------------------+---------+--------------+--------+----------------+-------------------------------------+--------+
| Token ID | Created | User ID | Type | Status | Name | Description | Policy |
+----------------------+-----------------------------+---------+--------------+--------+----------------+-------------------------------------+--------+
| hNAdH.aXHaEqFossMwT8 | 2025-09-29T03:52:43.281061Z | 123 | ReadNodeData | Active | Student access | Allow access to school system data. | |
+----------------------+-----------------------------+---------+--------------+--------+----------------+-------------------------------------+--------+
Token ID,Created,User ID,Type,Status,Name,Description,Policy
hNAdH.aXHaEqFossMwT8,2025-09-29T03:52:43.281061Z,123,ReadNodeData,Active,Student access,Allow access to school system data.,
{
"id" : "hNAdH.aXHaEqFossMwT8",
"created" : "2025-09-29 03:52:43.281061Z",
"userId" : 123,
"name" : "Student access",
"description" : "Allow access to school system data.",
"status" : "Active",
"type" : "ReadNodeData",
"expired" : false
}
Add policy restrictions, preserving existing restrictions:
s10k sec-tokens update --identifier kF67p6g30eUXQICUgzQf \
--node-id 107,164 \
--source-id '/REGION2/**'
+----------------------+-----------------------------+---------+------+--------+---------------------+----------------------------------------------+---------------------------------------------------+
| Token ID | Created | User ID | Type | Status | Name | Description | Policy |
+----------------------+-----------------------------+---------+------+--------+---------------------+----------------------------------------------+---------------------------------------------------+
| kF67p6g30eUXQICUgzQf | 2025-09-29T04:23:20.302917Z | 123 | User | Active | Reporting: region 1 | Allow access to region 1 for reporting team. | { |
| | | | | | | | "nodeIds" : [ 100, 101, 107, 164 ], |
| | | | | | | | "sourceIds" : [ "/REGION1/**", "/REGION2/**" ], |
| | | | | | | | "minAggregation" : "Hour", |
| | | | | | | | "refreshAllowed" : true |
| | | | | | | | } |
+----------------------+-----------------------------+---------+------+--------+---------------------+----------------------------------------------+---------------------------------------------------+
Token ID,Created,User ID,Type,Status,Name,Description,Policy
kF67p6g30eUXQICUgzQf,2025-09-29T04:23:20.302917Z,123,User,Active,Reporting: region 1,Allow access to region 1 for reporting team.,"{
""nodeIds"" : [ 100, 101, 107, 164 ],
""sourceIds"" : [ ""/REGION2/**"", ""/REGION1/**"" ],
""minAggregation"" : ""Hour"",
""refreshAllowed"" : true
}"
{
"id" : "kF67p6g30eUXQICUgzQf",
"created" : "2025-09-29 04:23:20.302917Z",
"userId" : 123,
"name" : "Reporting: region 1",
"description" : "Allow access to region 1 for reporting team.",
"status" : "Active",
"type" : "User",
"expired" : false,
"policy" : {
"nodeIds" : [ 100, 101, 107, 164 ],
"sourceIds" : [ "/REGION2/**", "/REGION1/**" ],
"minAggregation" : "Hour",
"refreshAllowed" : true
}
}
Replace policy restrictions, discarding existing restrictions, with the --replace
option:
s10k sec-tokens update --identifier kF67p6g30eUXQICUgzQf \
--node-id 107,164 \
--source-id '/REGION2/**' \
--replace
+----------------------+-----------------------------+---------+------+--------+---------------------+----------------------------------------------+-----------------------------------+
| Token ID | Created | User ID | Type | Status | Name | Description | Policy |
+----------------------+-----------------------------+---------+------+--------+---------------------+----------------------------------------------+-----------------------------------+
| kF67p6g30eUXQICUgzQf | 2025-09-29T04:23:20.302917Z | 123 | User | Active | Reporting: region 1 | Allow access to region 1 for reporting team. | { |
| | | | | | | | "nodeIds" : [ 107, 164 ], |
| | | | | | | | "sourceIds" : [ "/REGION2/**" ] |
| | | | | | | | } |
+----------------------+-----------------------------+---------+------+--------+---------------------+----------------------------------------------+-----------------------------------+
Token ID,Created,User ID,Type,Status,Name,Description,Policy
kF67p6g30eUXQICUgzQf,2025-09-29T04:23:20.302917Z,123,User,Active,Reporting: region 1,Allow access to region 1 for reporting team.,"{
""nodeIds"" : [ 107, 164 ],
""sourceIds"" : [ ""/REGION2/**"" ]
}"
{
"id" : "kF67p6g30eUXQICUgzQf",
"created" : "2025-09-29 04:23:20.302917Z",
"userId" : 123,
"name" : "Reporting: region 1",
"description" : "Allow access to region 1 for reporting team.",
"status" : "Active",
"type" : "User",
"expired" : false,
"policy" : {
"nodeIds" : [ 107, 164 ],
"sourceIds" : [ "/REGION2/**" ]
}
}