Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/40206?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: esim param_source: add is_abstract flag
......................................................................
esim param_source: add is_abstract flag
Allow omitting some ParamSource subclassed from
ParamSource.get_all_implementations().
My previous attempts at automagically detecting abstract classes failed
conceptually, and the easiest, most explicit way is already used in
ConfigurableParameter: add an is_abstract flag.
Prep for Ie7171c152a7b478736f8825050305606b5af5735
Change-Id: Icfccdd0a8ecb5e0e9d22afa490d73c9f1849a64c
---
M pySim/esim/saip/param_source.py
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/06/40206/4
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40206?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Icfccdd0a8ecb5e0e9d22afa490d73c9f1849a64c
Gerrit-Change-Number: 40206
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/40823?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: add test_configurable_parameters.py
......................................................................
add test_configurable_parameters.py
Change-Id: Ia55f0d11f8197ca15a948a83a34b3488acf1a0b4
---
M pySim/esim/saip/personalization.py
A tests/unittests/smdpp_data
A tests/unittests/test_configurable_parameters.py
A tests/unittests/xo/test_configurable_parameters
4 files changed, 1,420 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/23/40823/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40823?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia55f0d11f8197ca15a948a83a34b3488acf1a0b4
Gerrit-Change-Number: 40823
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/40096?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: personalization: add param_source.py, implement batch personalization
......................................................................
personalization: add param_source.py, implement batch personalization
Implement pySim.esim.saip.personalization.BatchPersonalization,
generating N eSIM profiles from a preset configuration.
Batch parameters can be fed by a constant, incrementing, random or from
CSV rows: add pySim.esim.saip.param_source.* classes to feed such input
to each of the BatchPersonalization's ConfigurableParameter instances.
Related: SYS#6768
Change-Id: I497c60c101ea0eea980e8b1a4b1f36c0eda39002
---
A pySim/esim/saip/param_source.py
M pySim/esim/saip/personalization.py
2 files changed, 282 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/96/40096/6
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40096?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I497c60c101ea0eea980e8b1a4b1f36c0eda39002
Gerrit-Change-Number: 40096
Gerrit-PatchSet: 6
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/40824?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: personalization.ConfigurableParameter: fix BytesIO() input
......................................................................
personalization.ConfigurableParameter: fix BytesIO() input
Change-Id: I0ad160eef9015e76eef10baee7c6b606fe249123
---
M pySim/esim/saip/personalization.py
M tests/unittests/test_configurable_parameters.py
M tests/unittests/xo/test_configurable_parameters
3 files changed, 193 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/24/40824/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40824?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0ad160eef9015e76eef10baee7c6b606fe249123
Gerrit-Change-Number: 40824
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/40825?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: personalization: add int as input type for BinaryParameter
......................................................................
personalization: add int as input type for BinaryParameter
Change-Id: I31d8142cb0847a8b291f8dc614d57cb4734f0190
---
M pySim/esim/saip/personalization.py
M tests/unittests/test_configurable_parameters.py
M tests/unittests/xo/test_configurable_parameters
3 files changed, 335 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/25/40825/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40825?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I31d8142cb0847a8b291f8dc614d57cb4734f0190
Gerrit-Change-Number: 40825
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/40826?usp=email )
Change subject: RandomHexDigitSource: rather return in string format, not bytes
......................................................................
RandomHexDigitSource: rather return in string format, not bytes
Change-Id: I4e86289f6fb72cbd4cf0c90b8b49538cfab69a7f
---
M pySim/esim/saip/param_source.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/26/40826/1
diff --git a/pySim/esim/saip/param_source.py b/pySim/esim/saip/param_source.py
index 8784261..adda445 100644
--- a/pySim/esim/saip/param_source.py
+++ b/pySim/esim/saip/param_source.py
@@ -20,6 +20,7 @@
import random
import re
from pySim.utils import all_subclasses_of
+from osmocom.utils import b2h
class ParamSourceExn(Exception):
pass
@@ -153,7 +154,7 @@
def get_next(self, csv_row:dict=None):
val = random.randbytes(self.num_digits // 2) # TODO secure random source?
- return val
+ return b2h(val)
@classmethod
def from_str(cls, s:str):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40826?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4e86289f6fb72cbd4cf0c90b8b49538cfab69a7f
Gerrit-Change-Number: 40826
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Attention is currently required from: laforge.
neels has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/40094?usp=email )
Change subject: personalization: set default values
......................................................................
Patch Set 4:
(6 comments)
Commit Message:
https://gerrit.osmocom.org/c/pysim/+/40094/comment/7d871308_60acd266?usp=em… :
PS2, Line 11: This is useful for user interaction, to prefill an input field that
: indicates a valid input to modify to taste.
> I beg to differ. […]
I think it looks odd in this patch because i later on separated the patch from the ParamSource patch. The defaults make more sense when you realize that, in practice, they mostly indicate the lengths for automatically generated digits.
For example, for Pin1 + RandomDigitSource, the user input is just '0000' to get a four digit random PIN, or '000000' to get a six digit pin.
A default value makes sense to indicate the input format to the user.
Indicating IMSI as '0010100000000000' + IncrementingDigitSource:
it is obvious that it is not a usual IMSI that I entered,
and it greatly clarifies what to enter to get a useful result.
A default value can make sense to indicate the most secure / most likely option,
like suggesting the longest allowed (random) key length, or choosing Milenage by default.
If I remove all defaults from sysmo-esim-mgr, then a user as to manually enter digits for all of K. Opc, Pin, Adm, all SdKeys before generating is possible.
It is infinitely more helpful to have a default of e.g. '0*16'+RandomDigitSource set for K, so users don't have to look it up.
Note, assigning a default value is not actually done in pysim, it is merely up to a caller to use the default value paired with a param source. code wise, it is very useful to place the info here, not in the caller.
File pySim/esim/saip/personalization.py:
https://gerrit.osmocom.org/c/pysim/+/40094/comment/64b7939f_cdedf895?usp=em… :
PS2, Line 278: default_value
> there's no point of an all-zero default ICCID.
that's true, it's a copy paste artifact from the random parameters...
in the esim mgr, we never let a user enter an ICCID so i never noticed.
I think it's still the most useful indicator for number of digits, if anyone ever used it.
We can set an empty default... but why drop the informational example?
https://gerrit.osmocom.org/c/pysim/+/40094/comment/22716676_d37c6a14?usp=em… :
PS2, Line 299:
> I also think there's no point in having a default for the IMSI
I explained my IMSI point above, let's continue the discussion there
https://gerrit.osmocom.org/c/pysim/+/40094/comment/3e590015_d58515a1?usp=em… :
PS2, Line 467: default_value = '0' * allow_len
> I'm not sure why any security key / pin should have any default value at all. […]
I made the point above: it goes with a RandomDigitSource, let's continue the discussion there
https://gerrit.osmocom.org/c/pysim/+/40094/comment/faf7649c_757c13aa?usp=em… :
PS2, Line 494: default_value = '0' * max_len
> same here
Done
https://gerrit.osmocom.org/c/pysim/+/40094/comment/a75bdfec_0b31fbde?usp=em… :
PS2, Line 582: default_value = '00' * allow_len
> no cryptographic key should have any default value. It's just creating security nightmares.
I made the point above: it is just a length indicator for a RandomDigitSource. Let's continue the discussion there
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40094?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2672fedcbc32cb7a6cb0c233a4a22112bd9aae03
Gerrit-Change-Number: 40094
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 04 Aug 2025 17:27:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/40198?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: personalization: implement reading back values from a PES
......................................................................
personalization: implement reading back values from a PES
Implement get_values_from_pes(), the reverse direction of apply_val():
read back and return values from a ProfileElementSequence. Implement for
all ConfigurableParameter subclasses.
Future: SdKey.get_values_from_pes() is reading pe.decoded[], which works
fine, but I07dfc378705eba1318e9e8652796cbde106c6a52 will change this
implementation to use the higher level ProfileElementSD members.
Implementation detail:
Implement get_values_from_pes() as classmethod that returns a generator.
Subclasses should yield all occurences of their parameter in a given
PES.
For example, the ICCID can appear in multiple places.
Iccid.get_values_from_pes() yields all of the individual values. A set()
of the results quickly tells whether the PES is consistent.
Rationales for reading back values:
This allows auditing an eSIM profile, particularly for producing an
output.csv from a batch personalization (that generated lots of random
key material which now needs to be fed to an HLR...).
Reading back from a binary result is more reliable than storing the
values that were fed into a personalization.
By auditing final DER results with this code, I discovered:
- "oh, there already was some key material in my UPP template."
- "all IMSIs ended up the same, forgot to set up the parameter."
- the SdKey.apply() implementations currently don't work, see
I07dfc378705eba1318e9e8652796cbde106c6a52 for a fix.
Change-Id: I234fc4317f0bdc1a486f0cee4fa432c1dce9b463
---
M pySim/esim/saip/personalization.py
1 file changed, 122 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/98/40198/3
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40198?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I234fc4317f0bdc1a486f0cee4fa432c1dce9b463
Gerrit-Change-Number: 40198
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>