updateBasicAuthConfiguration
put
/ccadmin/v1/merchant/basicAuth
Update Basic Auth Configuration. Updates basic authentication configuration. The basic auth system is meant to prevent acciddental access to servers, and is not intended to be a highly secure.
Request
Supported Media Types
- application/json
Body Parameter
Root Schema : updateBasicAuthConfiguration_request
{
"neverAuthenticateTargetHostNames":[
"mystore.com",
"www.mystore.com"
],
"ipRangesWhitelist":[
"192.168.1.1 - 192.168.1.15"
],
"passwords":{
"admin":"admin"
},
"pathWhitelist":[
"/foo/bar"
],
"realm":"Oracle Cloud Commerce Testing",
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccadmin/v1/merchant/basicAuth"
}
],
"enabled":true
}
- enabled
-
Type:
booleanWhether the basic auth system is enabled. Oracle strongly advises against disabling basic auth as this exposes non-production systems to web crawlers which could return non-production URLs in public search results. - ipRangesWhitelist
-
Type:
arrayipRangesWhitelistAdditional Properties Allowed:Represents client IP addresses or ranges of client IP addresses that are whitelisted and therefore do not have to provide basic auth authentication. IPv4 and IPv6 addresses are supported. Ranges are specified via a pair of IP addresses using '-' as a separator, or specified via CIDR notation. DNS/host names are not supported. - neverAuthenticateTargetHostNames
-
Type:
arrayneverAuthenticateTargetHostNamesAdditional Properties Allowed:Target host names that will be excluded from basic authentication. These are typically the customer facing host names ("mystore.com"). - passwords
-
Type:
objectpasswordsAdditional Properties Allowed:{ "type":"string" }Valid username/password combinations. The keys are the usernames and the values are the passwords. - pathWhitelist
-
Type:
arraypathWhitelistAdditional Properties Allowed:Site relative paths (for example, "/v1/ccadmin/login") that are excluded from basic authentication. - realm
-
Type:
stringThe basic auth realm that will be presented as part of the basic auth challenge.
Nested Schema : ipRangesWhitelist
Type:
arrayRepresents client IP addresses or ranges of client IP addresses that are whitelisted and therefore do not have to provide basic auth authentication. IPv4 and IPv6 addresses are supported. Ranges are specified via a pair of IP addresses using '-' as a separator, or specified via CIDR notation. DNS/host names are not supported.
-
Type:
string
Nested Schema : neverAuthenticateTargetHostNames
Type:
arrayTarget host names that will be excluded from basic authentication. These are typically the customer facing host names ("mystore.com").
-
Type:
string
Nested Schema : passwords
Type:
object-
Type:
string
Valid username/password combinations. The keys are the usernames and the values are the passwords.
Nested Schema : pathWhitelist
Type:
arraySite relative paths (for example, "/v1/ccadmin/login") that are excluded from basic authentication.
-
Type:
string
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateBasicAuthConfiguration_response
- enabled
-
Type:
booleanWhether the basic auth system is enabled. Oracle strongly advises against disabling basic auth as this exposes non-production systems to web crawlers which could return non-production URLs in public search results. - ipRangesWhitelist
-
Type:
arrayipRangesWhitelistAdditional Properties Allowed:Represents client IP addresses or ranges of client IP addresses that are whitelisted and therefore do not have to provide basic auth authentication. IPv4 and IPv6 addresses are supported. Ranges are specified via a pair of IP addresses using '-' as a separator, or specified via CIDR notation. DNS/host names are not supported. - neverAuthenticateTargetHostNames
-
Type:
arrayneverAuthenticateTargetHostNamesAdditional Properties Allowed:Target host names that will be excluded from basic authentication. These are typically the customer facing host names ("mystore.com"). - passwords
-
Type:
objectpasswordsAdditional Properties Allowed:{ "type":"string" }Valid username/password combinations. - pathWhitelist
-
Type:
arraypathWhitelistAdditional Properties Allowed:Site relative paths (for example, "/v1/ccadmin/login") that are excluded from basic authentication. - realm
-
Type:
stringThe basic auth realm that will be presented as part of the basic auth challenge.
Nested Schema : ipRangesWhitelist
Type:
arrayRepresents client IP addresses or ranges of client IP addresses that are whitelisted and therefore do not have to provide basic auth authentication. IPv4 and IPv6 addresses are supported. Ranges are specified via a pair of IP addresses using '-' as a separator, or specified via CIDR notation. DNS/host names are not supported.
-
Type:
string
Nested Schema : neverAuthenticateTargetHostNames
Type:
arrayTarget host names that will be excluded from basic authentication. These are typically the customer facing host names ("mystore.com").
-
Type:
string
Nested Schema : passwords
Nested Schema : pathWhitelist
Type:
arraySite relative paths (for example, "/v1/ccadmin/login") that are excluded from basic authentication.
-
Type:
string
Example application/json
{
"neverAuthenticateTargetHostNames":[
"mystore.com",
"www.mystore.com"
],
"ipRangesWhitelist":[
"192.168.1.1 - 192.168.1.15"
],
"passwords":{
"admin":"admin"
},
"pathWhitelist":[
"/foo/bar"
],
"realm":"Oracle Cloud Commerce Testing",
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccadmin/v1/merchant/basicAuth"
}
],
"enabled":true
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|13001|Validation errors were found in the input.|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{
"neverAuthenticateTargetHostNames": [
"mystore.com",
"www.mystore.com"
],
"ipRangesWhitelist": ["192.168.1.1 - 192.168.1.15"],
"passwords": {"admin": "admin"},
"pathWhitelist": ["/foo/bar"],
"realm": "Oracle Cloud Commerce Testing",
"links": [{
"rel": "self",
"href": "http://localhost:9080/ccadmin/v1/merchant/basicAuth"
}],
"enabled": true
}
Sample Response Payload returned by endpoint:
{
"neverAuthenticateTargetHostNames": [
"mystore.com",
"www.mystore.com"
],
"ipRangesWhitelist": ["192.168.1.1 - 192.168.1.15"],
"passwords": {"admin": "admin"},
"pathWhitelist": ["/foo/bar"],
"realm": "Oracle Cloud Commerce Testing",
"links": [{
"rel": "self",
"href": "http://localhost:9080/ccadmin/v1/merchant/basicAuth"
}],
"enabled": true
}