Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ATS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TST
ATS
Commits
3f225f7c
Commit
3f225f7c
authored
4 years ago
by
Yann Garcia
Browse files
Options
Downloads
Patches
Plain Diff
Rebuild project with Twb v30
parent
31b3b032
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
LibOneM2M/OneM2M_Functions.ttcn
+2
-2
2 additions, 2 deletions
LibOneM2M/OneM2M_Functions.ttcn
OneM2M_Testcases_AE_Release_4.ttcn
+121
-0
121 additions, 0 deletions
OneM2M_Testcases_AE_Release_4.ttcn
OneM2M_Testcases_CSE_Release_4.ttcn
+184
-93
184 additions, 93 deletions
OneM2M_Testcases_CSE_Release_4.ttcn
with
307 additions
and
95 deletions
LibOneM2M/OneM2M_Functions.ttcn
+
2
−
2
View file @
3f225f7c
This diff is collapsed.
Click to expand it.
OneM2M_Testcases_AE_Release_4.ttcn
+
121
−
0
View file @
3f225f7c
...
...
@@ -60,10 +60,131 @@ module OneM2M_Testcases_AE_Release_4 {
group
Direct_Dynamic_Authorization
{
/**
* @desc Check that the IUT processes properly basic Indirect Dynamic Authorization (Only mandatories steps applied)
*/
testcase
TC_AE_SEC_DDA_CRE_001
()
runs
on
Tester
system
AeSystem
{
var
CseSimu
v_cse1
:=
CseSimu
.
create
(
"CSE1"
)
alive
;
v_cse1
.
start
(
f_AE_SEC_DDA_CRE_001
(
e_absolute
));
v_cse1
.
done
;
}
function
f_AE_SEC_DDA_CRE_001
(
PrimitiveScope
p_primitiveScope
)
runs
on
CseSimu
system
AeSystem
{
var
template
UtTriggerPrimitive
v_utRequest
:=
m_utCreateContainer
;
var
integer
v_resourceIndex
:=
-
1
;
var
MsgIn
v_request
;
var
universal
charstring
v_action
:=
__SCOPE__
&
": Please, send a valid CREATE Request for container to "
;
if
(
not
(
PICS_ACP_SUPPORT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": AccessControlPolicy support is required to run this test case"
);
stop
;
}
if
(
not
(
PICS_DIRECT_DYN_AUTH_SUPPORT
)
or
not
(
PICS_DYN_AUTH_SUPPORT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": Direct Dynamic Authorization support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf03Up
();
// Preamble
// FIXME Security association establishment may be performed using AE1, E.g. TLS using AE1_ID
v_utRequest
.
requestPrimitive
.
to_
:=
f_getLocalResourceAddress
(
-
,
e_nonHierarchical
,
p_primitiveScope
);
f_ae_sendUtPrimitive
(
v_utRequest
,
v_action
&
f_getLocalResourceAddress
(
-
,
e_nonHierarchical
,
p_primitiveScope
));
// Test body
tc_ac
.
start
;
alt
{
[]
mcaPortIn
.
receive
(
mw_request
(
mw_createContainer
(
-
,
v_utRequest
.
requestPrimitive
.
to_
)))
->
value
v_request
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
" : Container creation request received successfuly"
);
v_resourceIndex
:=
f_processCreateRequestPrimitive
(
v_request
.
primitive
.
requestPrimitive
);
f_send
(
e_mcaPortIn
,
m_response
(
vc_response
.
primitive
.
responsePrimitive
));
}
[]
mcaPortIn
.
receive
(
mw_request
(
mw_createContainer
()))
->
value
v_request
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
" : Create Request with unexpected target"
);
f_send
(
e_mcaPortIn
,
m_response
(
valueof
(
m_responsePrimitive
(
int4004
,
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
,
omit
))));
stop
;
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
" : No answer while creating resource"
);
stop
;
}
}
// Postamble
f_cf03Down
();
}
}
//end group DirectDynamic_Authorization
group
Indirect_Dynamic_Authorization
{
/**
* @desc Check that the IUT processes properly basic Indirect Dynamic Authorization (Only mandatories steps applied)
*/
testcase
TC_AE_SEC_IDA_CRE_001
()
runs
on
Tester
system
AeSystem
{
var
CseSimu
v_cse1
:=
CseSimu
.
create
(
"CSE1"
)
alive
;
v_cse1
.
start
(
f_AE_SEC_IDA_CRE_001
(
e_absolute
));
v_cse1
.
done
;
}
function
f_AE_SEC_IDA_CRE_001
(
PrimitiveScope
p_primitiveScope
)
runs
on
CseSimu
system
AeSystem
{
var
template
UtTriggerPrimitive
v_utRequest
:=
m_utCreateContainer
;
var
integer
v_resourceIndex
:=
-
1
;
var
MsgIn
v_request
;
var
universal
charstring
v_action
:=
__SCOPE__
&
": Please, send a valid CREATE Request for container to "
;
if
(
not
(
PICS_ACP_SUPPORT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": AccessControlPolicy support is required to run this test case"
);
stop
;
}
if
(
PICS_DIRECT_DYN_AUTH_SUPPORT
or
not
(
PICS_DYN_AUTH_SUPPORT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": Indirect Dynamic Authorization support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf03Up
();
// Preamble
// FIXME Security association establishment may be performed using AE1, E.g. TLS using AE1_ID
v_utRequest
.
requestPrimitive
.
to_
:=
f_getLocalResourceAddress
(
-
,
e_nonHierarchical
,
p_primitiveScope
);
v_utRequest
.
primitiveContent
.
securityInfos
.
dasRequest
.
tokenIDs
:=
{
fx_assign_originatorToken
()
};
f_ae_sendUtPrimitive
(
v_utRequest
,
v_action
&
f_getLocalResourceAddress
(
-
,
e_nonHierarchical
,
p_primitiveScope
));
// Test body
tc_ac
.
start
;
alt
{
[]
mcaPortIn
.
receive
(
mw_request
(
mw_createContainer
(
-
,
v_utRequest
.
requestPrimitive
.
to_
)))
->
value
v_request
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
" : Container creation request received successfuly"
);
v_resourceIndex
:=
f_processCreateRequestPrimitive
(
v_request
.
primitive
.
requestPrimitive
);
f_send
(
e_mcaPortIn
,
m_response
(
vc_response
.
primitive
.
responsePrimitive
));
}
[]
mcaPortIn
.
receive
(
mw_request
(
mw_createContainer
()))
->
value
v_request
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
" : Create Request with unexpected target"
);
f_send
(
e_mcaPortIn
,
m_response
(
valueof
(
m_responsePrimitive
(
int4004
,
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
,
omit
))));
stop
;
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
" : No answer while creating resource"
);
stop
;
}
}
// Postamble
f_cf03Down
();
}
}
//end group IndirectDynamic_Authorization
}
//end group Dynamic_Authorization
...
...
This diff is collapsed.
Click to expand it.
OneM2M_Testcases_CSE_Release_4.ttcn
+
184
−
93
View file @
3f225f7c
...
...
@@ -659,7 +659,7 @@ module OneM2M_Testcases_CSE_Release_4 {
}
// Test component configuration
f_cf0
3
Up
();
f_cf0
2
Up
();
// Test adapter configuration
...
...
@@ -682,7 +682,7 @@ module OneM2M_Testcases_CSE_Release_4 {
// Test Body
v_createRequest
:=
f_getCreateRequestPrimitive
(
int1
,
v_createRequest
,
v_aeIndex
);
// Alter the 'From' field using AE identifier different that AE1_ID
v_createRequest
.
from_
:=
PX_TS_AE2
.
appId
Stem
;
v_createRequest
.
from_
:=
PX_TS_AE2
.
appId
;
f_send
(
e_mcaPort
,
m_request
(
valueof
(
v_createRequest
)));
tc_ac
.
start
;
...
...
@@ -704,7 +704,7 @@ module OneM2M_Testcases_CSE_Release_4 {
f_cse_postamble_deleteResources
();
//Tear down
f_cf0
3
Down
();
f_cf0
2
Down
();
}
//end TC_CSE_SEC_IP_CRE_001
...
...
@@ -730,9 +730,9 @@ module OneM2M_Testcases_CSE_Release_4 {
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_acpIndex
:=
-
1
;
var
integer
v_groupIndex
:=
-
1
;
var
XSD
.
ID
v_parentIndex
;
var
XSD
.
ID
v_resourceIndex
;
var
template
RequestPrimitive
v_request
:=
valueof
(
m_retrieve
)
;
var
integer
v_parentIndex
;
var
integer
v_resourceIndex
;
var
template
RequestPrimitive
v_request
;
// Test control
if
(
not
PICS_ESC_SUPPORT
)
{
...
...
@@ -745,7 +745,7 @@ module OneM2M_Testcases_CSE_Release_4 {
}
// Test component configuration
f_cf0
3
Up
();
f_cf0
2
Up
();
// Test adapter configuration
...
...
@@ -763,7 +763,7 @@ module OneM2M_Testcases_CSE_Release_4 {
// Test Body
v_request
:=
m_retrieve
(
f_getResourceAddress
(
v_resourceIndex
),
f_getOriginator
(
v_resourceIndex
));
// Alter the 'From' field using AE identifier different that AE1_ID
v_request
.
from_
:=
PX_TS_AE2
.
appId
Stem
;
v_request
.
from_
:=
PX_TS_AE2
.
appId
;
f_send
(
e_mcaPort
,
m_request
(
valueof
(
v_request
)));
tc_ac
.
start
;
...
...
@@ -785,7 +785,7 @@ module OneM2M_Testcases_CSE_Release_4 {
f_cse_postamble_deleteResources
();
//Tear down
f_cf0
3
Down
();
f_cf0
2
Down
();
}
//end TC_CSE_SEC_IP_RET_001
...
...
@@ -811,8 +811,8 @@ module OneM2M_Testcases_CSE_Release_4 {
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_acpIndex
:=
-
1
;
var
integer
v_groupIndex
:=
-
1
;
var
XSD
.
ID
v_parentIndex
;
var
XSD
.
ID
v_resourceIndex
;
var
integer
v_parentIndex
;
var
integer
v_resourceIndex
;
var
template
RequestPrimitive
v_update
:=
valueof
(
m_update
);
// Test control
...
...
@@ -826,7 +826,7 @@ module OneM2M_Testcases_CSE_Release_4 {
}
// Test component configuration
f_cf0
3
Up
();
f_cf0
2
Up
();
// Test adapter configuration
...
...
@@ -842,9 +842,9 @@ module OneM2M_Testcases_CSE_Release_4 {
v_resourceIndex
:=
f_cse_createResource
(
int4
,
m_createContainerBase
,
v_parentIndex
);
// Test Body
v_update
:=
m_update
(
f_getResourceAddress
(
v_resourceIndex
),
f_getOriginator
(
v_resourceIndex
)
);
v_update
:=
valueof
(
m_update
);
// Alter the 'From' field using AE identifier different that AE1_ID
v_update
.
from_
:=
PX_TS_AE2
.
appId
Stem
;
v_update
.
from_
:=
PX_TS_AE2
.
appId
;
f_send
(
e_mcaPort
,
m_request
(
valueof
(
v_update
)));
tc_ac
.
start
;
...
...
@@ -866,7 +866,7 @@ module OneM2M_Testcases_CSE_Release_4 {
f_cse_postamble_deleteResources
();
//Tear down
f_cf0
3
Down
();
f_cf0
2
Down
();
}
//end TC_CSE_SEC_IP_UPD_001
...
...
@@ -890,9 +890,9 @@ module OneM2M_Testcases_CSE_Release_4 {
function
f_CSE_SEC_IP_DEL_001
()
runs
on
AeSimu
system
CseSystem
{
// Local variables
var
integer
v_aeIndex
:=
-
1
;
var
XSD
.
ID
v_parentIndex
;
var
XSD
.
ID
v_resourceIndex
;
var
template
RequestPrimitive
v_delete
:=
valueof
(
m_delete
)
;
var
integer
v_parentIndex
;
var
integer
v_resourceIndex
;
var
template
RequestPrimitive
v_delete
;
// Test control
if
(
not
PICS_ESC_SUPPORT
)
{
...
...
@@ -905,7 +905,7 @@ module OneM2M_Testcases_CSE_Release_4 {
}
// Test component configuration
f_cf0
3
Up
();
f_cf0
2
Up
();
// Test adapter configuration
...
...
@@ -923,7 +923,7 @@ module OneM2M_Testcases_CSE_Release_4 {
// Test Body
v_delete
:=
m_delete
(
f_getResourceAddress
(
v_resourceIndex
),
f_getOriginator
(
v_resourceIndex
));
// Alter the 'From' field using AE identifier different that AE1_ID
v_delete
.
from_
:=
PX_TS_AE2
.
appId
Stem
;
v_delete
.
from_
:=
PX_TS_AE2
.
appId
;
f_send
(
e_mcaPort
,
m_request
(
valueof
(
v_delete
)));
tc_ac
.
start
;
...
...
@@ -945,7 +945,7 @@ module OneM2M_Testcases_CSE_Release_4 {
f_cse_postamble_deleteResources
();
//Tear down
f_cf0
3
Down
();
f_cf0
2
Down
();
}
//end TC_CSE_SEC_IP_DEL_001
...
...
@@ -992,7 +992,7 @@ module OneM2M_Testcases_CSE_Release_4 {
}
// Test component configuration
f_cf0
3
Up
();
f_cf0
2
Up
();
// Test adapter configuration
...
...
@@ -1025,25 +1025,26 @@ module OneM2M_Testcases_CSE_Release_4 {
if
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
securityInfoType
!=
int2
)
{
// Dynamic Authorization Response
setverdict
(
fail
,
__SCOPE__
&
": SecurityInfoType element is not set to '2' (Dynamic Authorization Response)"
);
}
if
(
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
))
{
if
(
ispresent
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
authorSignReqInfo
)
and
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
authorSignReqInfo
==
true
)
ispresent
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
authorSignReqInfo
)
and
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
authorSignReqInfo
==
true
)
)
{
setverdict
(
fail
,
__SCOPE__
&
": authorSignReqInfo element is not set to 'false' (Steps 6-8 not applied)"
);
}
if
(
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
)
and
(
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokens
)
or
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokenIDs
)
)
)
{
setverdict
(
pass
,
__SCOPE__
&
": Tokens/TokenIDs were created"
);
}
else
{
setverdict
(
fail
,
__SCOPE__
&
": Direct Dynamic Authorization failure"
);
}
}
else
{
setverdict
(
fail
,
__SCOPE__
&
": Direct Dynamic Authorization failure"
);
setverdict
(
fail
,
__SCOPE__
&
": 'dynAuthRelMapResponse' field not present"
);
}
}
else
{
setverdict
(
fail
,
__SCOPE__
&
": 'securityInfo' field not present"
);
}
}
[]
mcaPort
.
receive
(
mw_response
)
->
value
vc_response
{
...
...
@@ -1059,7 +1060,7 @@ module OneM2M_Testcases_CSE_Release_4 {
f_cse_postamble_deleteResources
();
//Tear down
f_cf0
3
Down
();
f_cf0
2
Down
();
}
//end TC_CSE_SEC_DDA_CRE_001
...
...
@@ -1097,7 +1098,7 @@ module OneM2M_Testcases_CSE_Release_4 {
}
// Test component configuration
f_cf0
3
Up
();
f_cf0
2
Up
();
// Test adapter configuration
...
...
@@ -1131,21 +1132,19 @@ module OneM2M_Testcases_CSE_Release_4 {
if
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
securityInfoType
!=
int2
)
{
// Dynamic Authorization Response
setverdict
(
fail
,
__SCOPE__
&
": SecurityInfoType element is not set to '2' (Dynamic Authorization Response)"
);
}
if
(
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
))
{
if
(
ispresent
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
authorSignReqInfo
)
and
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
authorSignReqInfo
==
false
)
ispresent
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
authorSignReqInfo
)
and
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
authorSignReqInfo
==
false
)
)
{
setverdict
(
fail
,
__SCOPE__
&
": authorSignReqInfo element is not set to 'true' (Steps 6-8 not applied)"
);
}
if
(
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
)
and
(
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokens
)
or
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokenIDs
)
)
)
{
var
SignatureList
v_authorSigns
;
var
template
RequestPrimitive
v_notifyRequest
:=
m_notifyNotification
(
f_getResourceAddress
(
v_aeIndex
));
var
template
RequestPrimitive
v_notifyRequest
:=
m_notifyNotification
(
f_getResourceAddress
(
v_aeIndex
)
,
m_contentCreateNotification
({
uRI
:=
""
},
omit
,
omit
,
omit
)
);
setverdict
(
pass
,
__SCOPE__
&
": Tokens/TokenIDs were created"
);
v_state
:=
v_state
+
1
;
...
...
@@ -1163,7 +1162,10 @@ module OneM2M_Testcases_CSE_Release_4 {
setverdict
(
fail
,
__SCOPE__
&
": Direct Dynamic Authorization failure"
);
}
}
else
{
setverdict
(
fail
,
__SCOPE__
&
": Direct Dynamic Authorization failure"
);
setverdict
(
fail
,
__SCOPE__
&
": 'dynAuthRelMapResponse' field not present"
);
}
}
else
{
setverdict
(
fail
,
__SCOPE__
&
": 'securityInfo' field not present"
);
}
}
[
v_state
==
1
]
mcaPort
.
receive
(
mw_response
(
mw_responseNotify
(
int2000
)))
->
value
vc_response
{
...
...
@@ -1183,7 +1185,7 @@ module OneM2M_Testcases_CSE_Release_4 {
f_cse_postamble_deleteResources
();
//Tear down
f_cf0
3
Down
();
f_cf0
2
Down
();
}
//end TC_CSE_SEC_DDA_CRE_002
...
...
@@ -1215,19 +1217,108 @@ module OneM2M_Testcases_CSE_Release_4 {
/**
* @desc Check that the IUT processes properly basic Indirect Dynamic Authorization (Only mandatories steps applied)
*/
testcase
TC_CSE_SEC_
D
DA_CRE_00
4
()
runs
on
Tester
system
CseSystem
{
testcase
TC_CSE_SEC_
I
DA_CRE_00
1
()
runs
on
Tester
system
CseSystem
{
var
AeSimu
v_ae1
:=
AeSimu
.
create
(
"AE1"
)
alive
;
v_ae1
.
start
(
f_CSE_SEC_
D
DA_CRE_00
4
());
v_ae1
.
start
(
f_CSE_SEC_
I
DA_CRE_00
1
());
v_ae1
.
done
;
}
function
f_CSE_SEC_DDA_CRE_004
()
runs
on
AeSimu
system
CseSystem
{
// TODO
}
//end TC_CSE_SEC_DDA_CRE_004
function
f_CSE_SEC_IDA_CRE_001
()
runs
on
AeSimu
system
CseSystem
{
// Local variables
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_acpIndex
:=
-
1
;
var
integer
v_groupIndex
:=
-
1
;
var
XSD
.
ID
v_ae1ResourceId
;
var
template
RequestPrimitive
v_groupRequest
:=
m_createGroup
(
1
,
-
,
omit
,
int2
,
-
,
-
,
-
);
var
template
RequestPrimitive
v_createRequest
:=
valueof
(
m_createAcpBase
);
// Test control
if
(
not
(
PICS_ACP_SUPPORT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": AccessControlPolicy support is required to run this test case"
);
stop
;
}
if
(
PICS_DIRECT_DYN_AUTH_SUPPORT
or
not
(
PICS_DYN_AUTH_SUPPORT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": Indirect Dynamic Authorization support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf02Up
();
// Test adapter configuration
// Preamble
// FIXME Security association establishment may be performed using AE1, E.g. TLS using AE1_ID
v_aeIndex
:=
f_cse_preamble_registerAe
(
-
,
-
);
vc_ae1
.
start
(
f_cse_createResource
(
int2
,
m_createAe
(
PX_TS_AE1
.
appId
,
-
,
PX_TS_AE1
.
aeIdStem
,
c_defaultAe1ResourceName
,
omit
),
-
1
));
// AE1 is registred
f_aeSimu_checkComponentDoneAndGetVerdict
(
vc_ae1
);
v_ae1ResourceId
:=
f_getLatestResourceAddress
(
vc_ae1
,
e_nonHierarchical
,
e_absolute
);
v_groupRequest
.
primitiveContent
.
group_
.
memberIDs
:=
{
v_ae1ResourceId
};
v_groupIndex
:=
f_cse_createResource
(
int3
,
v_groupRequest
,
v_aeIndex
);
v_createRequest
:=
m_createAcp
(
-
,
{
f_getResourceId
(
vc_resourcesList
[
v_groupIndex
].
resource
)}
,
-
);
// Test Body
v_createRequest
:=
f_getCreateRequestPrimitive
(
int1
,
v_createRequest
,
v_aeIndex
);
v_createRequest
.
primitiveContent
.
securityInfo
.
dynAuthRelMapRequest
.
tokenIDs
:=
{
fx_assign_originatorToken
()
};
f_send
(
e_mcaPort
,
m_request
(
valueof
(
v_createRequest
)));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2001
)))
->
value
vc_response
{
tc_ac
.
stop
;
//Check mandatory fields
if
(
ischosen
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
))
{
if
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
securityInfoType
!=
int2
)
{
// Dynamic Authorization Response
setverdict
(
fail
,
__SCOPE__
&
": SecurityInfoType element is not set to '2' (Dynamic Authorization Response)"
);
}
if
(
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
))
{
if
(
ispresent
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
authorSignReqInfo
)
and
(
vc_request
.
primitive
.
requestPrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
authorSignReqInfo
==
true
)
)
{
setverdict
(
fail
,
__SCOPE__
&
": authorSignReqInfo element is not set to 'false' (Steps 6-8 not applied)"
);
}
if
(
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokens
)
or
ispresent
(
vc_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
securityInfo
.
dynAuthRelMapResponse
.
tokenIDs
)
)
{
setverdict
(
pass
,
__SCOPE__
&
": Tokens/TokenIDs were created"
);
}
else
{
setverdict
(
fail
,
__SCOPE__
&
": Direct Dynamic Authorization failure"
);
}
}
else
{
setverdict
(
fail
,
__SCOPE__
&
": 'dynAuthRelMapResponse' field is not present"
);
}
}
else
{
setverdict
(
fail
,
__SCOPE__
&
": 'securityInfo' field is not present"
);
}
}
[]
mcaPort
.
receive
(
mw_response
)
->
value
vc_response
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code"
);
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while creating resource"
);
}
}
//Postamble
f_cse_postamble_deleteResources
();
//Tear down
f_cf02Down
();
}
//end TC_CSE_SEC_IDA_CRE_001
}
// end of group Create
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment