Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge staging into rc #656

Merged
merged 23 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cb35677
support for tls1.3
jordanfilteau1995 Sep 18, 2023
06fe9ba
updating zss schema to have keyshares and ciphers
jordanfilteau1995 Sep 18, 2023
1f18c24
v2.12.0
Sep 20, 2023
e1084b7
adding additional cipher for tls1.3
jordanfilteau1995 Oct 10, 2023
6280e2b
Merge branch 'v2.x/staging' into zss-tls1.3
jordanfilteau1995 Oct 10, 2023
5adbb0d
updating submodule for zowe-common-c
jordanfilteau1995 Oct 10, 2023
021e750
updating submodule for zowe-common-c
jordanfilteau1995 Oct 10, 2023
dbfe158
Merge pull request #646 from zowe/zss-tls1.3
1000TurquoisePogs Oct 10, 2023
105f4af
Update deps to include wtoPrintf3 fix
ifakhrutdinov Oct 11, 2023
b423393
Merge pull request #653 from zowe/feature/deps-update
JoeNemo Oct 12, 2023
c723bca
allowing disable of TLSv1.3
jordanfilteau1995 Oct 12, 2023
cd5274e
code simplify; changing to enum for maxTls
jordanfilteau1995 Oct 12, 2023
482b7df
fixing whitespace
jordanfilteau1995 Oct 12, 2023
d0e805d
Merge branch 'v2.x/staging' into zss-tls1.3
jordanfilteau1995 Oct 12, 2023
6cfcc1c
Add ability to do tls tracing via config
1000TurquoisePogs Oct 13, 2023
3e39427
fix ref to include agent
1000TurquoisePogs Oct 13, 2023
b5ddbbe
Merge pull request #655 from zowe/feature/tls-tracing-config
1000TurquoisePogs Oct 13, 2023
53f8442
splitting 1.2 and 1.3 default ciphers and configuration
jordanfilteau1995 Oct 13, 2023
c83cc1c
Merge branch 'zss-tls1.3' of github.com:zowe/zss into zss-tls1.3
jordanfilteau1995 Oct 13, 2023
2c2e6ef
updating submodule for zowe-common-c
jordanfilteau1995 Oct 13, 2023
dd3f02f
concatenating v1.2 ciphers to v1.3 ciphers
jordanfilteau1995 Oct 13, 2023
61baa0b
reverting changes
jordanfilteau1995 Oct 13, 2023
d83a479
Merge pull request #654 from zowe/zss-tls1.3
1000TurquoisePogs Oct 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ if [[ "${OSNAME}" == "OS/390" ]]; then
else
ZSS_SERVER="${ZSS_SERVER_31}"
fi


if [ "$ZWE_components_zss_agent_https_trace" = "true" ] && [ "$ZWES_LOG_FILE" != "/dev/null" ]; then
export GSK_TRACE_FILE="${ZWES_LOG_FILE}.tlstrace"
export GSK_TRACE=0xFF
fi

if [ "$ZWES_LOG_FILE" = "/dev/null" ]; then
_BPX_SHAREAS=NO _BPX_JOBNAME=${ZWE_zowe_job_prefix}SZ ${ZSS_SERVER} --schemas "${ZWES_SCHEMA_PATHS}" --configs "${ZWES_CONFIG}" 2>&1
else
Expand Down
4 changes: 2 additions & 2 deletions build/zis.proj.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT="zis"
VERSION=2.11.0
DYNLINK_PLUGIN_VERSION=4
VERSION=2.12.0
DYNLINK_PLUGIN_VERSION=5
DEPS=""
2 changes: 1 addition & 1 deletion build/zss.proj.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT="zss"
VERSION=2.11.0
VERSION=2.12.0
DEPS="QUICKJS LIBYAML"

QUICKJS="quickjs"
Expand Down
39 changes: 37 additions & 2 deletions c/zss.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,25 @@ static int traceLevel = 0;

#define JSON_ERROR_BUFFER_SIZE 1024

#define DEFAULT_TLS_CIPHERS \
#define DEFAULT_TLS_KEY_SHARES \
TLS_SECP256R1 \
TLS_SECP521R1 \
TLS_X25519

#define DEFAULT_TLS_CIPHERS_V12 \
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 \
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 \
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 \
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 \
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 \
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

#define DEFAULT_TLS_CIPHERS_V13 \
TLS_AES_256_GCM_SHA384 \
TLS_AES_128_GCM_SHA256 \
TLS_CHACHA20_POLY1305_SHA256 \
DEFAULT_TLS_CIPHERS_V12

#define LOGGING_COMPONENT_PREFIX "_zss."

static int stringEndsWith(char *s, char *suffix);
Expand Down Expand Up @@ -1149,7 +1160,31 @@ static bool readAgentHttpsSettingsV2(ShortLivedHeap *slh,
}
JsonObject *httpsConfigObject = jsonAsObject(httpsConfig);
TlsSettings *settings = (TlsSettings*)SLHAlloc(slh, sizeof(*settings));
settings->ciphers = DEFAULT_TLS_CIPHERS;
settings->maxTls = jsonObjectGetString(httpsConfigObject, "maxTls");
char *ciphers = jsonObjectGetString(httpsConfigObject, "ciphers");
/*
* Takes a string of ciphers. This isn't ideal, but any other methods are
* going to be fairly complicated.
*
* ciphers: 13021303003500380039002F00320033
*/
ECVT *ecvt = getECVT();
/*
2.3 (1020300) no tls 1.3
*/
if ((ecvt->ecvtpseq > 0x1020300) && (settings->maxTls == NULL || !strcmp(settings->maxTls, "TLSv1.3"))) {
settings->ciphers = ciphers ? ciphers : DEFAULT_TLS_CIPHERS_V13;
} else {
settings->ciphers = ciphers ? ciphers : DEFAULT_TLS_CIPHERS_V12;
}
/*
* Takes a string of keyshares. This isn't ideal, but any other methods are
* going to be fairly complicated.
*
* keyshares: 002300250029
*/
char *keyshares = jsonObjectGetString(httpsConfigObject, "keyshares");
settings->keyshares = keyshares ? keyshares : DEFAULT_TLS_KEY_SHARES;
settings->keyring = jsonObjectGetString(httpsConfigObject, "keyring");
settings->label = jsonObjectGetString(httpsConfigObject, "label");
/* settings->stash = jsonObjectGetString(httpsConfigObject, "stash"); - this is obsolete */
Expand Down
2 changes: 1 addition & 1 deletion deps/zowe-common-c
2 changes: 1 addition & 1 deletion manifest.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: zss
# Component identifier. This identifier matches artifact path in Zowe Artifactory https://zowe.jfrog.io/.
id: org.zowe.zss
# Without the v
version: 2.11.0
version: 2.12.0
# Component version is defined in gradle.properties for Gradle project
# Human readable component name
title: Zowe System Services (ZSS)
Expand Down
19 changes: 19 additions & 0 deletions schemas/zss-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@
"$ref": "#/$defs/ipsAndHostnames",
"default": [ "0.0.0.0" ]
},
"trace": {
"type": "boolean",
"description": "Enables TLS tracing to diagnose connection issues. Output will be within the zowe log directory.",
"default": false
},
"label": {
"type": [ "string", "null" ],
"description": "The label (aka alias), identifying the server's certificate in the key store"
Expand All @@ -117,6 +122,20 @@
"password": {
"type": [ "string", "null" ],
"description": "The password to the keyring"
},
"ciphers": {
"type": [ "string", "null" ],
"description": "The list of ciphers in order of priority"
},
"keyshares": {
"type": [ "string", "null" ],
"description": "The list of key shares in order of priority"
},
"maxTls": {
"type": [ "string", "null" ],
"enum": ["TLSv1.0", "TLSv1.1", "TLSv1.2", "TLSv1.3"],
"default": "TLSv1.3",
"description": "Maximum tls version allowed."
}
}
},
Expand Down
Loading