dexter has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42991?usp=email )
(
9 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: mnesia_db_rest: add comment on why we create an euicc entry early
......................................................................
mnesia_db_rest: add comment on why we create an euicc entry early
Even though it is technically not necessary, we ensure that an
entry is present in the euicc table on each REST API call. Let's
add a comment to explain why we do it anyway.
Change-Id: Ifb9340655c5f36e074a1a92c0e234ef62c79b9d8
Related: SYS#8100
---
M src/mnesia_db_rest.erl
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
jolly: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/mnesia_db_rest.erl b/src/mnesia_db_rest.erl
index 41b4a0c..0976beb 100644
--- a/src/mnesia_db_rest.erl
+++ b/src/mnesia_db_rest.erl
@@ -41,7 +41,13 @@
% Create REST resource (order)
create(Facility, EidValue, Order) ->
+ % Ensure that an euicc entry is present in the database for the given EidValue. In case no entry exists yet, a new
+ % entry is created with default parameters from sys.config, which is is sufficient in many usecases. From the
+ % technical perspective, this is just a convenience feature, which frees the REST API user from having to create an
+ % euicc entry manually before performming the first operation.
ok = mnesia_db_euicc:create_if_not_exist(EidValue),
+
+ % Continue with the normal creation of the REST resource.
ResourceId = uuid:uuid_to_string(uuid:get_v4_urandom()),
Timestamp = os:system_time(seconds),
Row = #rest{
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42991?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: Ifb9340655c5f36e074a1a92c0e234ef62c79b9d8
Gerrit-Change-Number: 42991
Gerrit-PatchSet: 10
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: dexter.
Hello Jenkins Builder, jolly, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/onomondo-eim/+/42991?usp=email
to look at the new patch set (#10).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: mnesia_db_rest: add comment on why we create an euicc entry early
......................................................................
mnesia_db_rest: add comment on why we create an euicc entry early
Even though it is technically not necessary, we ensure that an
entry is present in the euicc table on each REST API call. Let's
add a comment to explain why we do it anyway.
Change-Id: Ifb9340655c5f36e074a1a92c0e234ef62c79b9d8
Related: SYS#8100
---
M src/mnesia_db_rest.erl
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/91/42991/10
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42991?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: Ifb9340655c5f36e074a1a92c0e234ef62c79b9d8
Gerrit-Change-Number: 42991
Gerrit-PatchSet: 10
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
dexter has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42960?usp=email )
(
10 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: mnesia_db_euicc: rename timer_setparam to timer_rest
......................................................................
mnesia_db_euicc: rename timer_setparam to timer_rest
The function timer_setparam is processing REST API orders
in regular intervals. Naming the timer "timer_rest" makes
more sense.
Change-Id: Icfa203477e044ce2cc312d4b6e2693a97191c61d
Related: SYS#8100
---
M src/mnesia_db.erl
M src/mnesia_db_euicc.erl
2 files changed, 5 insertions(+), 5 deletions(-)
Approvals:
jolly: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/mnesia_db.erl b/src/mnesia_db.erl
index cd69e3a..d8e7afa 100644
--- a/src/mnesia_db.erl
+++ b/src/mnesia_db.erl
@@ -109,7 +109,7 @@
{atomic, ok} = mnesia:transaction(Trans),
% Start recurring event cycles
- ok = mnesia_db_euicc:timer_setparam(),
+ ok = mnesia_db_euicc:timer_rest(),
ok = mnesia_db_rest:timer_cleanup(),
ok.
diff --git a/src/mnesia_db_euicc.erl b/src/mnesia_db_euicc.erl
index 138290f..013b377 100644
--- a/src/mnesia_db_euicc.erl
+++ b/src/mnesia_db_euicc.erl
@@ -16,7 +16,7 @@
-export([dump/0]).
% trigger recurring events (called automatically by timer from this module)
--export([timer_setparam/0]).
+-export([timer_rest/0]).
trans_create_if_not_exist(EidValue) ->
{ok, CounterValue} = application:get_env(onomondo_eim, counter_value),
@@ -171,8 +171,8 @@
error
end.
-% Run scheduled eUICC procedures
-timer_setparam() ->
+% Handle REST requests in regular intervals
+timer_rest() ->
% An eUICC procedure in the context of this module has nothing to do with any of the procedures specified in
% GSMA SGP.22 or SGP.32. In this module an eUICC procedure is a virtual procedure were parameters in the
% euicc table are set.
@@ -246,7 +246,7 @@
end,
% Next euicc procedure in 10 secs.
- {ok, _} = timer:apply_after(10000, mnesia_db_euicc, timer_setparam, []),
+ {ok, _} = timer:apply_after(10000, mnesia_db_euicc, timer_rest, []),
ok.
% Dump all eUICCs we are aware of
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42960?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: Icfa203477e044ce2cc312d4b6e2693a97191c61d
Gerrit-Change-Number: 42960
Gerrit-PatchSet: 11
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: dexter.
Hello Jenkins Builder, jolly, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/onomondo-eim/+/42960?usp=email
to look at the new patch set (#11).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: mnesia_db_euicc: rename timer_setparam to timer_rest
......................................................................
mnesia_db_euicc: rename timer_setparam to timer_rest
The function timer_setparam is processing REST API orders
in regular intervals. Naming the timer "timer_rest" makes
more sense.
Change-Id: Icfa203477e044ce2cc312d4b6e2693a97191c61d
Related: SYS#8100
---
M src/mnesia_db.erl
M src/mnesia_db_euicc.erl
2 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/60/42960/11
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42960?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: Icfa203477e044ce2cc312d4b6e2693a97191c61d
Gerrit-Change-Number: 42960
Gerrit-PatchSet: 11
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
dexter has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42949?usp=email )
Change subject: esipa_asn1_handler_utils: rename EsipaReq to Debuginfo
......................................................................
esipa_asn1_handler_utils: rename EsipaReq to Debuginfo
The parameter EsipaReq only exists because we pass it as
Debuginfo to mnesia_db_work:finish. Let's rename it to
"Debuginfo" in esipa_asn1_handler_utils as well to make
clear what the purpose of this parameter is.
Change-Id: I8115d382172989b9ef7ae7f97ce39520e3e2dd16
Related: SYS#8100
---
M src/esipa_asn1_handler_utils.erl
1 file changed, 5 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
jolly: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/esipa_asn1_handler_utils.erl b/src/esipa_asn1_handler_utils.erl
index f288592..2e4295c 100644
--- a/src/esipa_asn1_handler_utils.erl
+++ b/src/esipa_asn1_handler_utils.erl
@@ -24,7 +24,7 @@
none
end.
-process_euiccPackageResult(Pid, EuiccPackageResult, EsipaReq, EimTransactionId) ->
+process_euiccPackageResult(Pid, EuiccPackageResult, Debuginfo, EimTransactionId) ->
WorkBind = fun(Map) ->
case maps:find(eimTransactionId, Map) of
{ok, Value} ->
@@ -83,18 +83,18 @@
[{[{euiccPackageErrorCode, undefinedError}]}]
end,
- mnesia_db_work:finish(Pid, Outcome, EsipaReq).
+ mnesia_db_work:finish(Pid, Outcome, Debuginfo).
% Handle an EuiccPackageResult, this includes everything from the handling of the work items in mnesia_db, down to
% signature checks and the generation of an appropriate outcome for the REST API.
-handle_euiccPackageResult(Pid, EuiccPackageResult, EsipaReq) ->
+handle_euiccPackageResult(Pid, EuiccPackageResult, Debuginfo) ->
EimTransactionId = eimTransactionId_from_euiccPackageResult(EuiccPackageResult),
{EidValue, _, _} = mnesia_db_work:pickup(Pid, EimTransactionId),
case crypto_utils:verify_euiccPackageResultSigned(EuiccPackageResult, EidValue) of
ok ->
- process_euiccPackageResult(Pid, EuiccPackageResult, EsipaReq, EimTransactionId);
+ process_euiccPackageResult(Pid, EuiccPackageResult, Debuginfo, EimTransactionId);
_ ->
mnesia_db_work:finish(
- Pid, [{[{procedureError, euiccSignatureInvalid}]}], EsipaReq
+ Pid, [{[{procedureError, euiccSignatureInvalid}]}], Debuginfo
)
end.
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42949?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I8115d382172989b9ef7ae7f97ce39520e3e2dd16
Gerrit-Change-Number: 42949
Gerrit-PatchSet: 11
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
dexter has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42948?usp=email )
Change subject: esipa: supply eimTransactionId in profileDownloadTriggerRequest
......................................................................
esipa: supply eimTransactionId in profileDownloadTriggerRequest
When we supply an eimTransactionId in profileDownloadTriggerRequest,
the IPAd will echo the same eimTransactionId in the
initiateAuthenticationRequestEsipa message. This allows the eIM
to distinguish to which transaction (work) the received
initiateAuthenticationRequestEsipa belongs. This was not possible
before. The eIM had to rely soly on the PID of the sub process
which is handling the HTTP connection.
Change-Id: I822d6b2bb51498713739671804b173260e9a28a3
Related: SYS#8100
---
M src/esipa_asn1_handler.erl
1 file changed, 10 insertions(+), 5 deletions(-)
Approvals:
jolly: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/esipa_asn1_handler.erl b/src/esipa_asn1_handler.erl
index 94389c7..1815499 100644
--- a/src/esipa_asn1_handler.erl
+++ b/src/esipa_asn1_handler.erl
@@ -19,7 +19,8 @@
%GSMA SGP.32, section 6.3.2.1
handle_asn1(Pid, {initiateAuthenticationRequestEsipa, EsipaReq}) ->
- {_, _, WorkState} = mnesia_db_work:pickup(Pid, none),
+ EimTransactionId = maps:get(eimTransactionId, EsipaReq, none),
+ {_, _, WorkState} = mnesia_db_work:pickup(Pid, EimTransactionId),
BaseUrl = maps:get(smdpAddress, EsipaReq),
NewWorkState = WorkState#{smdpAddress => BaseUrl},
mnesia_db_work:update(Pid, NewWorkState),
@@ -284,12 +285,16 @@
EsipaResp =
case Work of
{download, Order} ->
- % The first time we see a TransactionId is in the SMDP+ response to the
- % initiateAuthenticationRequest
- {[{<<"download">>, {[{<<"activationCode">>, ActivationCode}]}}]} = Order,
+ % The first time we see a transactionId from the SM-DP+ is in the SM-DP+ response to the
+ % initiateAuthenticationRequest. Until this point we will use an eimTransactionId as a
+ % temporary identifier.
+ EimTransactionId = rand:bytes(16),
+ mnesia_db_work:bind(Pid, EimTransactionId),
mnesia_db_work:update(Pid, #{}),
+ {[{<<"download">>, {[{<<"activationCode">>, ActivationCode}]}}]} = Order,
{profileDownloadTriggerRequest, #{
- profileDownloadData => {activationCode, ActivationCode}
+ profileDownloadData => {activationCode, ActivationCode},
+ eimTransactionId => EimTransactionId
}};
{psmo, Order} ->
EimTransactionId = rand:bytes(16),
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42948?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I822d6b2bb51498713739671804b173260e9a28a3
Gerrit-Change-Number: 42948
Gerrit-PatchSet: 11
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/43390?usp=email )
Change subject: pdpctx: sgsn_pdp_ctx_terminate(): free PDP context if GTP side is detached
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/43390?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ia74407c34576bfcc1f4ab9d1940b500da86cfbab
Gerrit-Change-Number: 43390
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 26 Aug 2026 08:04:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes