Commit 7e91a81d authored by garciay's avatar garciay
Browse files

Dockerfile: useradd issue fixed

parent 9b425776
......@@ -66,7 +66,7 @@ RUN echo "docker-titan-STF525" > /etc/hostname \
xsltproc \
&& DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y \
&& DEBIAN_FRONTEND=noninteractive apt-get autoclean \
&& useradd --create-home --shell /bin/bash --groups sudo,etsi etsi \
&& useradd --create-home --shell /bin/bash --user-group etsi --groups sudo \
&& echo "etsi:etsi" | chpasswd \
&& adduser etsi sudo \
&& cd /home/etsi \
......
......@@ -10,122 +10,150 @@
* All rights reserved.
*/
module ItsPki_TestCases {
// Libcommon
import from LibCommon_Time all;
import from LibCommon_VerdictControl all;
import from LibCommon_Sync all;
import from LibCommon_BasicTypesAndValues all;
// Libcommon
import from LibCommon_Time all;
import from LibCommon_VerdictControl all;
import from LibCommon_Sync all;
import from LibCommon_BasicTypesAndValues all;
// LibIts
import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
import from IEEE1609dot2 language "ASN.1:1997" all;
import from EtsiTs102941BaseTypes language "ASN.1:1997" all;
import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all;
import from EtsiTs102941MessagesItss language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// LibIts
import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
import from IEEE1609dot2 language "ASN.1:1997" all;
import from EtsiTs102941BaseTypes language "ASN.1:1997" all;
import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all;
import from EtsiTs102941MessagesItss language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_Functions all;
import from LibItsCommon_ASN1_NamedNumbers all;
// LibItsCommon
import from LibItsCommon_Functions all;
import from LibItsCommon_ASN1_NamedNumbers all;
// LibItsCam
import from LibItsCam_TestSystem all;
import from LibItsCam_Functions all;
import from LibItsCam_Templates all;
import from LibItsCam_TypesAndValues all;
import from LibItsCam_Pics all;
// LibItsCam
import from LibItsCam_TestSystem all;
import from LibItsCam_Functions all;
import from LibItsCam_Templates all;
import from LibItsCam_TypesAndValues all;
import from LibItsCam_Pics all;
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
import from LibItsSecurity_TestSystem all;
import from LibItsSecurity_Templates all;
import from LibItsSecurity_Functions all;
import from LibItsSecurity_Pixits all;
import from LibItsSecurity_Pics all;
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
import from LibItsSecurity_TestSystem all;
import from LibItsSecurity_Templates all;
import from LibItsSecurity_Functions all;
import from LibItsSecurity_Pixits all;
import from LibItsSecurity_Pics all;
// LibItsHttp
import from LibItsHttp_TypesAndValues all;
import from LibItsHttp_Templates all;
import from LibItsHttp_BinaryTemplates all;
import from LibItsHttp_Functions all;
// LibItsHttp
import from LibItsHttp_TypesAndValues all;
import from LibItsHttp_Templates all;
import from LibItsHttp_BinaryTemplates all;
import from LibItsHttp_Functions all;
// LibItsPki
import from LibItsPki_Templates all;
import from LibItsPki_TestSystem all;
// LibItsPki
import from LibItsPki_Templates all;
import from LibItsPki_TestSystem all;
// AtsPki
import from ItsPki_Functions all;
// AtsPki
import from ItsPki_Functions all;
/**
* @desc Check that protocolVersion is set to 1 and messageID is
* set to 2.
* <pre>
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* a CAM is generated
* }
* then {
* the IUT sends a valid CAM
* containing ITS PDU header
* containing protocolVersion
* indicating value 1
* and containing messageID
* indicating value 2
* }
* }
* </pre>
*
* @see ETSI TS 102 868-2 v1.4.1 TP/CAM/MSD/FMT/BV-01
* @reference ETSI EN 302 637-2 v1.3.2, Annex B.1
*/
testcase TC_SEC_PKI_SND_EA_01_BV() runs on ItsPki system ItsPkiSystem {
testcase TC_SEC_PKI_SND_EA_01_BV() runs on ItsPki system ItsPkiSystem {
// Local variables
var EtsiTs103097Certificate v_certificate;
var HeaderLines v_headers;
var charstring vc_hashedId8ToBeUsed := "CERT_IUT_F_AT";
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
vc_hashedId8ToBeUsed := "CERT_IUT_F_AT";
f_cfUp(); // Initialise IUT with CERT_IUT_F_AT signed with CERT_IUT_F_AA
// Test adapter configuration
// Preamble
f_prInitialState();
f_readCertificate(vc_hashedId8ToBeUsed, v_certificate);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
"/",
v_headers,
m_http_message_body_binary(
m_binary_body_innerEcRequest(
m_innerEcRequest(
"TODO",
m_publicKeys(
v_certificate.toBeSigned.verifyKeyIndicator.verificationKey,
v_certificate.toBeSigned.encryptionKey
),
m_certificateSubjectAttributes(
v_certificate.toBeSigned.appPermissions,
v_certificate.toBeSigned.validityPeriod,
v_certificate.toBeSigned.region,
v_certificate.toBeSigned.assuranceLevel
)))))));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_binary(
mw_binary_body_innerEcResponse(
mw_innerEcResponse_ok
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Security protocol version set to 3 ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cfDown();
} // End of testcase TC_SEC_ITSS_SND_MSG_01_BV
// Local variables
var EtsiTs103097Certificate v_certificate;
var HeaderLines v_headers;
var charstring vc_hashedId8ToBeUsed := "CERT_IUT_F_AT";
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
vc_hashedId8ToBeUsed := "CERT_IUT_F_AT";
f_cfUp(); // Initialise IUT with CERT_IUT_F_AT signed with CERT_IUT_F_AA
// Test adapter configuration
// Preamble
f_prInitialState();
f_readCertificate(vc_hashedId8ToBeUsed, v_certificate);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
"/",
v_headers,
m_http_message_body_binary(
m_binary_body_innerEcRequest(
m_innerEcRequest(
"TODO",
m_publicKeys(
v_certificate.toBeSigned.verifyKeyIndicator.verificationKey,
v_certificate.toBeSigned.encryptionKey
),
m_certificateSubjectAttributes(
v_certificate.toBeSigned.appPermissions,
v_certificate.toBeSigned.validityPeriod,
v_certificate.toBeSigned.region,
v_certificate.toBeSigned.assuranceLevel
)))))));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_binary(
mw_binary_body_innerEcResponse(
mw_innerEcResponse_ok
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Security protocol version set to 3 ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cfDown();
} // End of testcase TC_SEC_ITSS_SND_MSG_01_BV
} // End of module ItsPki_TestCases
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment