Files
scylladb/api/api-doc/messaging_service.json
Pekka Enberg 422cff5e00 api/messaging_service: Fix heap-buffer-overflows in set_messaging_service()
Fix various issues in set_messaging_service() that caused
heap-buffer-overflows when JMX proxy connects to Scylla API:

  - Off-by-one error in 'num_verb' definition

  - Call to initializer list std::vector constructor variant that caused
    the vector to be two elements long.

  - Missing verb definitions from the Swagger definition that caused
    response vector to be too small.

Spotted by ASan.
Message-Id: <1453125439-16703-1-git-send-email-penberg@scylladb.com>
2016-01-18 15:43:29 +01:00

264 lines
7.1 KiB
JSON

{
"apiVersion":"0.0.1",
"swaggerVersion":"1.2",
"basePath":"{{Protocol}}://{{Host}}",
"resourcePath":"/messaging_service",
"produces":[
"application/json"
],
"apis":[
{
"path":"/messaging_service/messages/timeout",
"operations":[
{
"method":"GET",
"summary":"Get the number of timeout messages",
"type":"array",
"items":{
"type":"message_counter"
},
"nickname":"get_timeout_messages",
"produces":[
"application/json"
],
"parameters":[
]
}
]
},
{
"path":"/messaging_service/messages/dropped_by_ver",
"operations":[
{
"method":"GET",
"summary":"Get the number of dropped messages per verb",
"type":"array",
"items":{
"type":"verb_counter"
},
"nickname":"get_dropped_messages_by_ver",
"produces":[
"application/json"
],
"parameters":[
]
}
]
},
{
"path":"/messaging_service/messages/dropped",
"operations":[
{
"method":"GET",
"summary":"Get the number of messages that were dropped before sending",
"type":"array",
"items":{
"type":"message_counter"
},
"nickname":"get_dropped_messages",
"produces":[
"application/json"
],
"parameters":[
]
}
]
},
{
"path":"/messaging_service/messages/replied",
"operations":[
{
"method":"GET",
"summary":"Get the number of replied messages",
"type":"array",
"items":{
"type":"message_counter"
},
"nickname":"get_completed_messages",
"produces":[
"application/json"
],
"parameters":[
]
}
]
},
{
"path":"/messaging_service/messages/sent",
"operations":[
{
"method":"GET",
"summary":"Get the number of sent messages",
"type":"array",
"items":{
"type":"message_counter"
},
"nickname":"get_sent_messages",
"produces":[
"application/json"
],
"parameters":[
]
}
]
},
{
"path":"/messaging_service/messages/pending",
"operations":[
{
"method":"GET",
"summary":"Get the number of pending messages",
"type":"array",
"items":{
"type":"message_counter"
},
"nickname":"get_pending_messages",
"produces":[
"application/json"
],
"parameters":[
]
}
]
},
{
"path":"/messaging_service/messages/exception",
"operations":[
{
"method":"GET",
"summary":"Get the number of messages return with an exception",
"type":"array",
"items":{
"type":"message_counter"
},
"nickname":"get_exception_messages",
"produces":[
"application/json"
],
"parameters":[
]
}
]
},
{
"path":"/messaging_service/messages/respond_pending",
"operations":[
{
"method":"GET",
"summary":"Get the number of messages waiting for respond",
"type":"array",
"items":{
"type":"message_counter"
},
"nickname":"get_respond_pending_messages",
"produces":[
"application/json"
],
"parameters":[
]
}
]
},
{
"path":"/messaging_service/messages/respond_completed",
"operations":[
{
"method":"GET",
"summary":"Get the number of completed respond messages",
"type":"array",
"items":{
"type":"message_counter"
},
"nickname":"get_respond_completed_messages",
"produces":[
"application/json"
],
"parameters":[
]
}
]
},
{
"path":"/messaging_service/version",
"operations":[
{
"method":"GET",
"summary":"Get the version number",
"type":"int",
"nickname":"get_version",
"produces":[
"application/json"
],
"parameters":[
{
"name":"addr",
"description":"Address",
"required":true,
"allowMultiple":false,
"type":"string",
"paramType":"query"
}
]
}
]
}
],
"models":{
"message_counter":{
"id":"message_counter",
"description":"Holds command counters",
"properties":{
"value":{
"type":"long"
},
"key":{
"type":"string"
}
}
},
"verb_counter":{
"id":"verb_counters",
"description":"Holds verb counters",
"properties":{
"count":{
"type":"long"
},
"verb":{
"type":"string",
"enum":[
"CLIENT_ID",
"ECHO",
"MUTATION",
"MUTATION_DONE",
"READ_DATA",
"READ_MUTATION_DATA",
"READ_DIGEST",
"GOSSIP_DIGEST_SYN",
"GOSSIP_DIGEST_ACK2",
"GOSSIP_SHUTDOWN",
"DEFINITIONS_UPDATE",
"TRUNCATE",
"REPLICATION_FINISHED",
"MIGRATION_REQUEST",
"STREAM_INIT_MESSAGE",
"PREPARE_MESSAGE",
"PREPARE_DONE_MESSAGE",
"STREAM_MUTATION",
"STREAM_MUTATION_DONE",
"COMPLETE_MESSAGE",
"REPAIR_CHECKSUM_RANGE",
"GET_SCHEMA_VERSION"
]
}
}
}
}
}