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

RBAC checking via custom authHandler function + SAF query interpretation #281

Open
wants to merge 82 commits into
base: v1.x/staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
3a8e00b
Initial commit for SAF query interpretation methods
DivergentEuropeans Apr 13, 2021
94742a0
Increase buffer size for subUrl
DivergentEuropeans Apr 13, 2021
278dc2b
Changed buffer size for some other strings
DivergentEuropeans Apr 13, 2021
35fe4be
Code review comments regarding NULL & buffer size
DivergentEuropeans Apr 14, 2021
f4fb448
Added safeMalloc
DivergentEuropeans Apr 14, 2021
9a191ad
strcpy -> snprintf to avoid possible overflow
DivergentEuropeans Apr 14, 2021
2b271d7
Increased buffer for some variables
DivergentEuropeans Apr 14, 2021
40c0770
sprintf --> snprintf to avoid overflow
DivergentEuropeans Apr 14, 2021
7df8380
Small typo
DivergentEuropeans Apr 14, 2021
21eb96d
Changed snprintf method usage
DivergentEuropeans Apr 15, 2021
038b915
Revert
DivergentEuropeans Apr 15, 2021
0d154ad
Addressed more code review like NULL checks
DivergentEuropeans Apr 25, 2021
c91b2dc
Some prototype RBAC checking + unfinished comments
DivergentEuropeans May 24, 2021
54a35c5
Merge branch 'staging' of github.com:zowe/zss into RBAC-support
DivergentEuropeans May 24, 2021
a618f31
Annoying char change
DivergentEuropeans May 24, 2021
a6ef66e
Updated dep
DivergentEuropeans May 24, 2021
245cdbc
Added check for rbac: true | false
DivergentEuropeans May 25, 2021
98cd911
Merge github.com:zowe/zss into RBAC-support
DivergentEuropeans May 25, 2021
a7a4e1e
Updated zowe-common-c
DivergentEuropeans May 31, 2021
b0f8914
Moved core RBAC auth logic from zowe-common-c into ZSS
DivergentEuropeans Jun 3, 2021
2b55af4
Merge branch 'staging' of https://github.com/zowe/zss into RBAC-support
DivergentEuropeans Jun 3, 2021
63ce32f
Fixed merge conflicts
DivergentEuropeans Jun 5, 2021
a132c8b
Updated zowe-common-c
DivergentEuropeans Jun 7, 2021
0c1b0f5
Changed authType to string
DivergentEuropeans Jun 7, 2021
4c50186
Missed a few things
DivergentEuropeans Jun 7, 2021
8da7246
Removed comments
DivergentEuropeans Jun 7, 2021
f11219f
Updated zowe-common-c
DivergentEuropeans Jun 7, 2021
efde2a2
Removed leftover comments
DivergentEuropeans Jun 7, 2021
0add3ec
Code review adjustments from Irek
DivergentEuropeans Jun 11, 2021
3eaf7a0
Don't use URL query params in SAF query
DivergentEuropeans Jun 11, 2021
f35aa89
Changed #define value name to be more relevant
DivergentEuropeans Jun 11, 2021
357f0d0
Rename
DivergentEuropeans Jun 11, 2021
06a16ef
Removed regEx to use parsedFile instead
DivergentEuropeans Jun 16, 2021
86ee872
Re-added bypass services for NO RBAC
DivergentEuropeans Jun 18, 2021
21b1496
Removed comments + clean up unused variables
DivergentEuropeans Jun 18, 2021
970cd23
Some code cleanup
Jun 20, 2021
8a7ad43
Address code review
Jun 22, 2021
60f1e4c
More code cleanup
Jun 23, 2021
4beeca2
Respect env variable for RBAC too
DivergentEuropeans Jun 25, 2021
c537201
Added some useful debug logging
DivergentEuropeans Jun 25, 2021
371319a
Merge branch 'staging' of https://github.com/zowe/zss into RBAC-support
DivergentEuropeans Jun 25, 2021
a9f1ed1
Remove mistakenly added file
Jul 1, 2021
7840318
Update pointer to zowe-common-c
Jul 1, 2021
954f921
Remove SERVICE_AUTH_NATIVE_WITH_SESSION_TOKEN_NO_RBAC
Jul 1, 2021
11ff99f
Refactor authorization code
Jul 1, 2021
9590ce1
Register RBAC handler only if RBAC enabled
Jul 1, 2021
ac967f2
Refactoring + use rbacAuthorization only when username is on request
Jul 2, 2021
5ade5c9
Detect ZOWE_INSTANCE
Jul 2, 2021
ef8b441
Fix username check
Jul 2, 2021
ef78692
Rafactor SAF profile check
Jul 2, 2021
894bc65
ServerStatusServer has respect ZWED_dataserviceAuthentication_rbac en…
Jul 2, 2021
f0d839a
Minor fixes
Jul 5, 2021
5f4f553
Update pointer to zowe-common-c
Jul 5, 2021
f9e437d
Add const for getProfileNameFromRequest args
Jul 7, 2021
1a63674
Add profileNameBufSize arg
Jul 7, 2021
961b7a7
Add const for arguments
Jul 7, 2021
f774e80
Merge pull request #310 from lchudinov/rbac-code-cleanup
DivergentEuropeans Aug 19, 2021
a4ad82a
Merge branch 'staging' of github.com:zowe/zss into RBAC-support
DivergentEuropeans Aug 19, 2021
f3b8d91
Updated with more of Irek's suggested code changes
DivergentEuropeans Aug 23, 2021
ddf0408
Merge branch 'refactor-rbac-code' of https://github.com/lchudinov/zss…
DivergentEuropeans Aug 26, 2021
e2ed56e
Removed 'class' as an arg
DivergentEuropeans Aug 26, 2021
47a8af9
Merge branch 'staging' of github.com:zowe/zss into RBAC-support
DivergentEuropeans Aug 29, 2021
4fc145c
PassTicket REST API skeleton
Aug 6, 2021
542f458
Implement PassTicket generation
Aug 9, 2021
414466c
Refactoring for PassTicket
Aug 11, 2021
ad39d3b
Add passTicketService.c to build_zss.sh
Aug 11, 2021
3b10697
Update Changelog
Aug 11, 2021
918bf99
Cleanup includes
Aug 12, 2021
6b1f6b4
Merge branch 'feature/passticket-service' of https://github.com/lchud…
DivergentEuropeans Aug 30, 2021
b83e85e
Disable RBAC authorization for saf-auth service
Aug 31, 2021
42acd8e
Update pointer to zowe-common-c
Aug 31, 2021
a4b56df
Update pointer to zowe-common-c
Aug 31, 2021
909ecb2
Merge pull request #331 from lchudinov/feature/disable-rbac-authoriza…
lchudinov Aug 31, 2021
0899ef7
Fix buffer size
Aug 31, 2021
7c6cd42
Merge pull request #332 from lchudinov/bugfix/fix-buffer-size
lchudinov Aug 31, 2021
acf074c
Updated zowe-common-c
DivergentEuropeans Sep 24, 2021
46e527d
Merge branch 'RBAC-support' of github.com:zowe/zss into RBAC-support
DivergentEuropeans Sep 24, 2021
ea23113
Merge branch 'staging' of github.com:zowe/zss into RBAC-support
DivergentEuropeans Sep 24, 2021
65e909e
Updated zowe-common-c
DivergentEuropeans Sep 24, 2021
6a66374
Small changelog typo
DivergentEuropeans Sep 24, 2021
47b6665
Merge remote-tracking branch 'origin/staging' into RBAC-support
Nov 29, 2021
8160346
Adderss code review
Nov 29, 2021
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
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All notable changes to the ZSS package will be documented in this file.

## `1.25.0`

- Enhancement: Added RBAC capability via SAF checks
- Enhancement: Add an endpoint for PassTicket generation
- Enhancement: Add an endpoint for user info
- Enhancement: Added method to read and set loglevel of dataservices
Expand All @@ -23,16 +24,13 @@ All notable changes to the ZSS package will be documented in this file.
- Bugfix: Fix `zis-plugin-install.sh` script to properly exit on error with extended-install
- Bugfix: When builtin TLS was enabled, a small leak occurred when closing sockets.


## `1.23.0`

- Bugfix: `relativeTo` parsing may have failed depending upon path length and contents, leading to skipped plugin loading.
- Enhancement: Disable impersonation for OMVS Service.

## `1.22.0`

### New features and enhancements

- Bugfix: Dataset contents API doesn't skip empty records while reading a dataset
- Enhancement: Plugins can push state out to the Caching Service for high availability storage via a storage API, available to dataservices as `remoteStorage`
- Enhancement: Plugins can push state out to the In-Memory Storage via a storage API, available to dataservices as `localStorage`
Expand Down
239 changes: 233 additions & 6 deletions c/authService.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
#include "httpserver.h"
#include "zssLogging.h"

#define SAF_CLASS "ZOWE"
#define JSON_ERROR_BUFFER_SIZE 1024
#define JSON_ERROR_BUFFER_SIZE 1024
#define STRING_BUFFER_SIZE 1024
#define SAF_SUB_URL_SIZE 32

#define SAF_PASSWORD_RESET_RC_OK 0
#define SAF_PASSWORD_RESET_RC_WRONG_PASSWORD 111
Expand All @@ -45,7 +46,10 @@
#define SAF_PASSWORD_RESET_RC_NO_NEW_PASSSWORD 168
#define SAF_PASSWORD_RESET_RC_WRONG_FORMAT 169

#define RESPONSE_MESSAGE_LENGTH 100
#define RESPONSE_MESSAGE_LENGTH 100

#define SAF_PLUGIN_ID "ORG.ZOWE.CONFIGJS"
#define SAF_SERVICE_NAME "DATA"

/*
* A handler performing the SAF_AUTH check: checks if the user has the
Expand All @@ -66,6 +70,26 @@

static int serveAuthCheck(HttpService *service, HttpResponse *response);

static int makeProfileName(
char *profileName,
int profileNameBufSize,
const char *type,
const char *productCode,
int instanceID,
const char *pluginID,
const char *rootServiceName,
const char *serviceName,
const char *method,
const char *scope,
char subUrl[SAF_SUB_URL_SIZE][STRING_BUFFER_SIZE]);

static void setProfileNameAttribs(
char *pluginID,
char *serviceName,
char *type,
char *scope,
char subUrl[SAF_SUB_URL_SIZE][STRING_BUFFER_SIZE]);

int installAuthCheckService(HttpServer *server) {
// zowelog(NULL, 0, ZOWE_LOG_DEBUG2, "begin %s\n",
// __FUNCTION__);
Expand All @@ -74,6 +98,7 @@ int installAuthCheckService(HttpServer *server) {
httpService->authType = SERVICE_AUTH_NATIVE_WITH_SESSION_TOKEN;
httpService->serviceFunction = &serveAuthCheck;
httpService->runInSubtask = FALSE;
httpService->authorizationType = SERVICE_AUTHORIZATION_TYPE_NONE;
registerHttpService(server, httpService);
// zowelog(NULL, 0, ZOWE_LOG_DEBUG2, "end %s\n",
// __FUNCTION__);
Expand Down Expand Up @@ -162,7 +187,7 @@ static int serveAuthCheck(HttpService *service, HttpResponse *res) {
int rc = 0, rsn = 0, safStatus = 0;
ZISAuthServiceStatus reqStatus = {0};
CrossMemoryServerName *privilegedServerName;
const char *userName = req->username, *class = SAF_CLASS;
const char *userName = req->username, *class = ZOWE_SAF_CLASS;
rc = extractQuery(req->parsedFile, &entity, &accessStr);
if (rc != 0) {
respondWithError(res, HTTP_STATUS_BAD_REQUEST, "Broken auth query");
Expand All @@ -173,16 +198,218 @@ static int serveAuthCheck(HttpService *service, HttpResponse *res) {
respondWithError(res, HTTP_STATUS_BAD_REQUEST, "Unexpected access level");
return 0;
}
/* printf("query: user %s, class %s, entity %s, access %d\n", userName, class,
entity, access); */

privilegedServerName = getConfiguredProperty(service->server,
HTTP_SERVER_PRIVILEGED_SERVER_PROPERTY);
rc = zisCheckEntity(privilegedServerName, userName, class, entity, access,
&reqStatus);

respond(res, rc, &reqStatus);
return 0;
}

int verifyAccessToSafProfile(HttpServer *server, const char *userName, const char *entity, const int access) {
CrossMemoryServerName *privilegedServerName = getConfiguredProperty(server, HTTP_SERVER_PRIVILEGED_SERVER_PROPERTY);
ZISAuthServiceStatus reqStatus = {0};
const char *class = ZOWE_SAF_CLASS;

int rc = zisCheckEntity(privilegedServerName, userName, class, entity, access, &reqStatus);
zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_DEBUG2,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add zowedump for reqStatus so you can debug what's happening.

"verifyAccessToSafProfile entity '%s' class '%s' access '%d' , rc: %d\n", entity, class, access, rc);

return (rc != RC_ZIS_SRVC_OK) ? -1 : 0;
}

int getProfileNameFromRequest(char *profileName, const int profileNameBufSize, StringList *parsedFile, const char *method, int instanceID) {
char type[STRING_BUFFER_SIZE] = {0}; // core || config || service
char productCode[STRING_BUFFER_SIZE] = {0};
char rootServiceName[STRING_BUFFER_SIZE] = {0};
char subUrl[SAF_SUB_URL_SIZE][STRING_BUFFER_SIZE] = {0};
char scope[STRING_BUFFER_SIZE] = {0};
char pluginID[STRING_BUFFER_SIZE] = {0};
char serviceName[STRING_BUFFER_SIZE] = {0};
char urlSegment[STRING_BUFFER_SIZE] = {0};
int subUrlIndex = 0;
bool isRootServiceNameInited = false;

snprintf(urlSegment, sizeof(urlSegment), "%s", stringListPrint(parsedFile, 1, 1, "/", 0));
StringListElt *pathSegment = firstStringListElt(parsedFile);

strupcase(urlSegment);
DivergentEuropeans marked this conversation as resolved.
Show resolved Hide resolved
if (instanceID < 0) { // Set instanceID
instanceID = 0;
}
if (strcmp(urlSegment, "PLUGINS") != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please clarify the logic? Also, examples of different cases would be really helpful.

zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_DEBUG2,
"parsedFile urlSegment check didn't match.\n");
subUrlIndex = -1;
while (pathSegment != NULL) {
snprintf(urlSegment, sizeof(urlSegment), "%s", pathSegment->string);
strupcase(urlSegment);
if (!isRootServiceNameInited) {
snprintf(rootServiceName, sizeof(rootServiceName), urlSegment);
isRootServiceNameInited = true;
} else { //If URL subsections > SAF_SUB_URL_SIZE, we trim them from profile name (by not appending them)
if (subUrlIndex < SAF_SUB_URL_SIZE) {
DivergentEuropeans marked this conversation as resolved.
Show resolved Hide resolved
snprintf(subUrl[subUrlIndex], sizeof(subUrl), urlSegment);
}
}
subUrlIndex++;
pathSegment = pathSegment->next;
}
snprintf(productCode, sizeof(productCode), "ZLUX");
snprintf(type, sizeof(type), "core");
} else {
subUrlIndex = 0;

while (pathSegment != NULL) {
snprintf(urlSegment, sizeof(urlSegment), "%s", pathSegment->string);
strupcase(urlSegment);
switch(subUrlIndex) {
case 0:
snprintf(productCode, sizeof(productCode), urlSegment);
break;
case 1:
break;
case 2:
snprintf(pluginID, sizeof(pluginID), urlSegment);
break;
case 3:
break;
case 4:
snprintf(serviceName, sizeof(serviceName), urlSegment);
break;
Comment on lines +269 to +281
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these cases are never entered, these buffers will stay uninitialized, this will cause issues in setProfileNameAttribs and makeProfileName.

case 5:
break;
default: {
int adjustedSubUrlIndex = subUrlIndex - 6; // subtract 6 from maximum index to begin init subUrl array at 0
if (adjustedSubUrlIndex < SAF_SUB_URL_SIZE) {
snprintf(subUrl[adjustedSubUrlIndex], sizeof(subUrl), urlSegment);
}
}
}
subUrlIndex++;
pathSegment = pathSegment->next;
}

setProfileNameAttribs(pluginID, serviceName, type, scope, subUrl);
int pluginIDLen = strlen(pluginID);
for (int index = 0; index < pluginIDLen; index++) {
if (pluginID[index] == '.') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pluginID may be uninitialized.

pluginID[index] = '_';
}
}
zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_DEBUG2,
"parsedFile urlSegment check OK.\n");
}
return makeProfileName(profileName, profileNameBufSize,
type,
productCode,
instanceID,
pluginID,
rootServiceName,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rootServiceName may be uninitialized.

serviceName,
method,
scope,
subUrl);
}

static void setProfileNameAttribs(
char *pluginID,
const char *serviceName,
char *type,
char *scope,
char subUrl[SAF_SUB_URL_SIZE][STRING_BUFFER_SIZE]) {
if ((strcmp(pluginID, SAF_PLUGIN_ID) == 0) && (strcmp(serviceName, SAF_SERVICE_NAME) == 0))
{
snprintf(type, STRING_BUFFER_SIZE, "config");
snprintf(pluginID, STRING_BUFFER_SIZE, subUrl[0]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we overwrite the pluginID variable, can you please explain the logic?

snprintf(scope, STRING_BUFFER_SIZE, subUrl[1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why STRING_BUFFER_SIZE? Are scope and the other destination guaranteed to be that size?


} else {
snprintf(type, STRING_BUFFER_SIZE, "service");
}
}

static int makeProfileName(
char *profileName,
DivergentEuropeans marked this conversation as resolved.
Show resolved Hide resolved
const int profileNameBufSize,
const char *type,
const char *productCode,
int instanceID,
const char *pluginID,
const char *rootServiceName,
const char *serviceName,
const char *method,
const char *scope,
char subUrl[SAF_SUB_URL_SIZE][STRING_BUFFER_SIZE]) {
if (instanceID == -1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ever -1? getProfileNameFromRequest does the following:

  if (instanceID < 0) { // Set instanceID
    instanceID = 0;
  }

zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_WARNING,
"Broken SAF query. Missing instance ID.\n");
return -1;
}
if (method == NULL) {
zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_WARNING,
"Broken SAF query. Missing method.\n");
return -1;
}
int pos = 0;
if (strcmp(type, "service") == 0) {
if (pluginID == NULL) {
zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_WARNING,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that someone malicious will send multiple malformed requests flooding the log?

"Broken SAF query. Missing plugin ID.\n");
return -1;
}
if (serviceName == NULL) {
zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_WARNING,
"Broken SAF query. Missing service name.\n");
return -1;
}
pos = snprintf(profileName, profileNameBufSize, "%s.%d.SVC.%s.%s.%s", productCode, instanceID, pluginID, serviceName, method);
} else if (strcmp(type, "config") == 0) {
if (pluginID == NULL) {
zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_WARNING,
"Broken SAF query. Missing plugin ID.\n");
return -1;
}
if (scope == NULL) {
zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_WARNING,
"Broken SAF query. Missing scope.\n");
return -1;
}
pos = snprintf(profileName, profileNameBufSize, "%s.%d.CFG.%s.%s.%s", productCode, instanceID, pluginID, method, scope);
} else if (strcmp(type, "core") == 0) {
if (rootServiceName == NULL) {
zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_WARNING,
"Broken SAF query. Missing root service name.\n");
return -1;
}
pos = snprintf(profileName, profileNameBufSize, "%s.%d.COR.%s.%s", productCode, instanceID, method, rootServiceName);
} else if (pos < 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be just a standalone if-statement?

zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_WARNING,
"Internal string encoding error.\n");
return -1;
}
// Child endpoints housed via subUrl
int index = 0;
while (index < SAF_SUB_URL_SIZE && strcmp(subUrl[index], "") != 0) {
if (pos >= profileNameBufSize) {
break;
}
pos += snprintf(profileName + pos, profileNameBufSize - pos, ".%s", subUrl[index]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to also check if the result is < 0 since we're doing that for the other calls?

index++;
}
if (pos >= profileNameBufSize) {
char errMsg[256];
snprintf(errMsg, sizeof(errMsg), "Generated SAF query longer than %d\n", profileNameBufSize - 1);
zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_WARNING, errMsg);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the following instead of writing to errMsg?

zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_WARNING,
        "Generated SAF query longer than %d\n", profileNameBufSize - 1);

return -1;
}
zowelog(NULL, LOG_COMP_ID_SECURITY, ZOWE_LOG_DEBUG2,
"Finished generating profileName: %s\n", profileName);
return 0;
}

void respondWithJsonStatus(HttpResponse *response, const char *status, int statusCode, const char *statusMessage) {
jsonPrinter *out = respondWithJsonPrinter(response);
setResponseStatus(response,statusCode,(char *)statusMessage);
Expand Down
3 changes: 3 additions & 0 deletions c/datasetService.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ void installDatasetContentsService(HttpServer *server) {

HttpService *httpService = makeGeneratedService("datasetContents", "/datasetContents/**");
httpService->authType = SERVICE_AUTH_NATIVE_WITH_SESSION_TOKEN;
httpService->authorizationType = SERVICE_AUTHORIZATION_TYPE_NONE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do 3rd party plugins have to do this as well and then rebuild the binaries, or will everything work without recompilation?

httpService->runInSubtask = TRUE;
httpService->doImpersonation = TRUE;
httpService->serviceFunction = serveDatasetContents;
Expand All @@ -201,6 +202,7 @@ void installVSAMDatasetContentsService(HttpServer *server) {

HttpService *httpService = makeGeneratedService("VSAMdatasetContents", "/VSAMdatasetContents/**");
httpService->authType = SERVICE_AUTH_NATIVE_WITH_SESSION_TOKEN;
httpService->authorizationType = SERVICE_AUTHORIZATION_TYPE_NONE;
httpService->runInSubtask = TRUE;
httpService->doImpersonation = TRUE;
httpService->serviceFunction = serveVSAMDatasetContents;
Expand All @@ -219,6 +221,7 @@ void installDatasetMetadataService(HttpServer *server) {

HttpService *httpService = makeGeneratedService("datasetMetadata", "/datasetMetadata/**");
httpService->authType = SERVICE_AUTH_NATIVE_WITH_SESSION_TOKEN;
httpService->authorizationType = SERVICE_AUTHORIZATION_TYPE_NONE;
httpService->runInSubtask = TRUE;
httpService->doImpersonation = TRUE;
httpService->serviceFunction = serveDatasetMetadata;
Expand Down
1 change: 1 addition & 0 deletions c/omvsService.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ int installOMVSService(HttpServer *server)
{
HttpService *httpService = makeGeneratedService("OMVS_Service", "/omvs/**");
httpService->authType = SERVICE_AUTH_NATIVE_WITH_SESSION_TOKEN;
httpService->authorizationType = SERVICE_AUTHORIZATION_TYPE_NONE;
httpService->serviceFunction = &serveOMVSSegment;
httpService->runInSubtask = FALSE;
httpService->doImpersonation = FALSE;
Expand Down
4 changes: 4 additions & 0 deletions c/securityService.c
Original file line number Diff line number Diff line change
Expand Up @@ -3356,6 +3356,7 @@ void installSecurityManagementServices(HttpServer *server) {
makeStringParamSpec("dryRun", SERVICE_ARG_OPTIONAL, NULL
)));
classMgmtService->authType = SERVICE_AUTH_NATIVE_WITH_SESSION_TOKEN;
classMgmtService->authorizationType = SERVICE_AUTHORIZATION_TYPE_NONE;
classMgmtService->serviceFunction = &serveClassManagement;
classMgmtService->runInSubtask = TRUE;
classMgmtService->doImpersonation = TRUE;
Expand All @@ -3370,6 +3371,7 @@ void installSecurityManagementServices(HttpServer *server) {
makeStringParamSpec("dryRun", SERVICE_ARG_OPTIONAL, NULL
)));
userProfileService->authType = SERVICE_AUTH_NATIVE_WITH_SESSION_TOKEN;
userProfileService->authorizationType = SERVICE_AUTHORIZATION_TYPE_NONE;
userProfileService->serviceFunction = &serveUserProfile;
userProfileService->runInSubtask = TRUE;
userProfileService->doImpersonation = TRUE;
Expand All @@ -3384,6 +3386,7 @@ void installSecurityManagementServices(HttpServer *server) {
makeStringParamSpec("dryRun", SERVICE_ARG_OPTIONAL, NULL
)));
groupMgmtService->authType = SERVICE_AUTH_NATIVE_WITH_SESSION_TOKEN;
groupMgmtService->authorizationType = SERVICE_AUTHORIZATION_TYPE_NONE;
groupMgmtService->serviceFunction = &serveGroupManagement;
groupMgmtService->runInSubtask = TRUE;
groupMgmtService->doImpersonation = TRUE;
Expand All @@ -3397,6 +3400,7 @@ void installSecurityManagementServices(HttpServer *server) {
makeIntParamSpec("traceLevel", SERVICE_ARG_OPTIONAL, 0, 0, 0, 0, NULL
));
accessService->authType = SERVICE_AUTH_NATIVE_WITH_SESSION_TOKEN;
accessService->authorizationType = SERVICE_AUTHORIZATION_TYPE_NONE;
accessService->serviceFunction = &serveAccessInfo;
accessService->runInSubtask = TRUE;
accessService->doImpersonation = TRUE;
Expand Down
Loading