diff --git a/api/external/infra_proxy/infra_proxy.pb.go b/api/external/infra_proxy/infra_proxy.pb.go index d5b51b174863..2c8e1632e845 100644 --- a/api/external/infra_proxy/infra_proxy.pb.go +++ b/api/external/infra_proxy/infra_proxy.pb.go @@ -34,104 +34,106 @@ func init() { } var fileDescriptor_8898095cc3dd9190 = []byte{ - // 1546 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xcb, 0x6f, 0xdc, 0x44, - 0x18, 0x97, 0x8d, 0x54, 0xc8, 0x90, 0x42, 0x19, 0xa0, 0x4d, 0xdd, 0x72, 0x19, 0x04, 0x2a, 0xdb, - 0xae, 0x9d, 0x4d, 0xd2, 0xa6, 0xdd, 0x40, 0x95, 0x26, 0x2d, 0xab, 0x00, 0x82, 0x92, 0x8a, 0xb7, - 0x20, 0x72, 0xbc, 0x93, 0xad, 0xd5, 0xb5, 0x67, 0xb1, 0x27, 0x55, 0xa3, 0x28, 0x02, 0xf1, 0x38, - 0x10, 0x81, 0x10, 0xaa, 0x78, 0x54, 0x55, 0x00, 0x41, 0x79, 0x0b, 0x71, 0x8a, 0xf8, 0x13, 0x38, - 0x54, 0x9c, 0xb8, 0xc0, 0x09, 0x09, 0x21, 0xee, 0x88, 0x23, 0x48, 0xa0, 0xf1, 0xd8, 0xeb, 0xd9, - 0x64, 0x93, 0x99, 0xd9, 0x8d, 0xc5, 0xa5, 0x4d, 0xe2, 0xef, 0x37, 0xfe, 0x7e, 0xbf, 0xef, 0x31, - 0xdf, 0xd8, 0x06, 0x25, 0xb7, 0xe5, 0x3b, 0xf8, 0x12, 0xc5, 0x51, 0xe8, 0x36, 0x1d, 0x3f, 0x5c, - 0x88, 0xdc, 0xb9, 0x56, 0x44, 0x2e, 0x2d, 0x89, 0x3f, 0xdb, 0xad, 0x88, 0x50, 0x02, 0xef, 0xf2, - 0xce, 0xe3, 0x05, 0xdb, 0x5d, 0xa4, 0x24, 0x70, 0x29, 0xb6, 0xdd, 0x96, 0x6f, 0x0b, 0x46, 0xd6, - 0xc1, 0x06, 0x21, 0x8d, 0x26, 0x76, 0xd8, 0x8a, 0x6e, 0x18, 0x12, 0xea, 0x52, 0x9f, 0x84, 0x31, - 0x07, 0x5b, 0x87, 0xb7, 0xbc, 0x51, 0x84, 0x5f, 0x5c, 0xc4, 0x31, 0x75, 0x48, 0xd4, 0xc8, 0x8c, - 0x6d, 0xa9, 0x71, 0x8c, 0xa3, 0x8b, 0x38, 0xca, 0xec, 0x87, 0xa5, 0xf6, 0x1e, 0x21, 0x17, 0xe6, - 0x09, 0xb9, 0x90, 0x21, 0x8e, 0x48, 0x11, 0x11, 0x69, 0x62, 0x75, 0x7f, 0xbc, 0xa6, 0x8f, 0x43, - 0x9a, 0xd9, 0x3b, 0x52, 0xfb, 0xba, 0x4b, 0xdd, 0x79, 0xb7, 0x4d, 0x78, 0x54, 0x0a, 0xc0, 0xe1, - 0x45, 0x3f, 0x22, 0x61, 0x20, 0xdc, 0x45, 0xce, 0x21, 0x24, 0xf5, 0x36, 0x87, 0x11, 0xa9, 0x75, - 0x8b, 0x34, 0x7d, 0x6f, 0x69, 0xc1, 0xcf, 0x79, 0x6f, 0x77, 0x87, 0xb8, 0x45, 0xc2, 0x18, 0x8b, - 0x51, 0x73, 0xe4, 0xd6, 0x9d, 0x61, 0xab, 0xc8, 0x01, 0x1b, 0xe3, 0x56, 0x96, 0x43, 0xc4, 0xc0, - 0x29, 0xb8, 0xd4, 0x19, 0xb9, 0x61, 0x39, 0x60, 0x43, 0xe8, 0xc6, 0xe4, 0x88, 0x2e, 0xb1, 0x53, - 0xe0, 0x21, 0x06, 0x6f, 0x54, 0x6e, 0xbe, 0x39, 0x7a, 0xf7, 0x75, 0x80, 0x3c, 0x12, 0x04, 0x24, - 0x74, 0x98, 0xfc, 0x7e, 0xfe, 0x7f, 0x6a, 0x3a, 0xe9, 0x91, 0xa0, 0x45, 0x42, 0xe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, 0x00, 0xcb, 0x5a, 0x04, 0x2d, 0x5b, - 0x8f, 0x1f, 0x62, 0xe1, 0x28, 0x81, 0x43, 0x0a, 0xf4, 0xd4, 0xba, 0x4a, 0x19, 0x1e, 0x56, 0xe3, - 0xc8, 0x43, 0xf9, 0xa7, 0x01, 0x06, 0x78, 0xed, 0x33, 0xae, 0xc3, 0x5a, 0x3d, 0x86, 0xd1, 0xad, - 0xe8, 0x35, 0x18, 0xc6, 0xf8, 0x25, 0x9d, 0x80, 0x4a, 0xcb, 0xf1, 0x10, 0x52, 0x8c, 0x69, 0x5e, - 0x9a, 0xff, 0x18, 0x60, 0x80, 0x37, 0x05, 0x1d, 0xce, 0x6d, 0x84, 0x3a, 0xe7, 0x36, 0x04, 0xbd, - 0x61, 0x68, 0x87, 0x59, 0xca, 0xbc, 0x6c, 0xe9, 0x44, 0x3a, 0xa7, 0xff, 0x97, 0x01, 0x06, 0x78, - 0xbb, 0xd0, 0xa1, 0xdf, 0x46, 0xa8, 0xd3, 0x6f, 0x43, 0xd0, 0xcb, 0x45, 0xd0, 0x2f, 0x69, 0x25, - 0xfa, 0x55, 0x13, 0xec, 0x99, 0xc5, 0x71, 0x52, 0x74, 0xa7, 0xea, 0x81, 0x1f, 0x3e, 0x8c, 0x97, - 0xe0, 0xb8, 0x22, 0xf9, 0x8d, 0x40, 0xeb, 0xb8, 0xaa, 0x06, 0x1b, 0x91, 0xe8, 0x72, 0x01, 0x52, - 0x8c, 0x5b, 0x47, 0x35, 0xa4, 0x60, 0x93, 0x35, 0xa6, 0xe5, 0x0b, 0x78, 0x29, 0xcf, 0x89, 0xb7, - 0x4d, 0x30, 0x58, 0xc3, 0x74, 0x3a, 0x3b, 0x94, 0xa8, 0x77, 0x82, 0x0c, 0xa1, 0xd1, 0x09, 0x32, - 0x08, 0xba, 0xc2, 0xb4, 0x38, 0x0e, 0x8e, 0x29, 0x69, 0x41, 0xa2, 0x46, 0xf2, 0x5b, 0xfb, 0xe0, - 0x24, 0x6d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0x9c, 0x65, 0x46, 0x69, 0x8e, 0x2e, 0xb5, 0xd8, 0x16, - 0xc7, 0x15, 0xbb, 0xc2, 0x2b, 0xf0, 0x6c, 0xfe, 0x3e, 0x5d, 0x39, 0xb3, 0x04, 0x8c, 0x7a, 0x66, - 0x09, 0x20, 0x7e, 0x84, 0xaa, 0x82, 0xe3, 0x5a, 0x5a, 0x09, 0x6f, 0xfe, 0xa5, 0x8a, 0x3d, 0x00, - 0x27, 0x74, 0x15, 0x13, 0x96, 0x87, 0x6b, 0x26, 0xd8, 0xdd, 0xa1, 0x8d, 0xf2, 0xa9, 0x32, 0x87, - 0xa8, 0xbf, 0x0b, 0xcf, 0x31, 0xe8, 0x5a, 0xd1, 0xc2, 0x9c, 0x86, 0x53, 0x7d, 0x08, 0x93, 0xe6, - 0xce, 0xd4, 0xe8, 0xb3, 0x95, 0x86, 0x4f, 0xcf, 0x2f, 0xce, 0xdb, 0x1e, 0x09, 0x1c, 0x46, 0xb3, - 0xfd, 0x39, 0xc5, 0x96, 0x9f, 0xa2, 0xcc, 0xef, 0x4a, 0xbe, 0xa0, 0x18, 0xfd, 0x2f, 0x00, 0x00, - 0xff, 0xff, 0xc2, 0xbc, 0xe7, 0xbb, 0x8c, 0x25, 0x00, 0x00, + // 1569 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xcd, 0x6f, 0xdc, 0xc4, + 0x1b, 0x96, 0xfd, 0x93, 0xfa, 0x23, 0x43, 0x0a, 0x65, 0x80, 0x36, 0x75, 0xcb, 0x65, 0x10, 0xa8, + 0x6c, 0xbb, 0x76, 0x36, 0x49, 0x9b, 0x76, 0x03, 0x55, 0x9a, 0xa4, 0xac, 0x02, 0x08, 0x4a, 0x2a, + 0xbe, 0x05, 0x91, 0xe3, 0x9d, 0x6c, 0xad, 0xae, 0x3d, 0x8b, 0x3d, 0xa9, 0x1a, 0x45, 0x11, 0x08, + 0xc1, 0x81, 0x08, 0x84, 0x50, 0xf9, 0x2a, 0x55, 0x01, 0x41, 0xf9, 0x16, 0xe2, 0x14, 0xf1, 0x27, + 0x70, 0xa8, 0x38, 0x71, 0x81, 0x13, 0x12, 0x42, 0xdc, 0x11, 0x47, 0x90, 0x40, 0xe3, 0xb1, 0xd7, + 0xb3, 0xc9, 0x26, 0x33, 0xb3, 0x1b, 0x8b, 0x4b, 0x3f, 0xe2, 0xf7, 0x19, 0xbf, 0xcf, 0xf3, 0x7e, + 0xcc, 0x3b, 0xce, 0x80, 0x92, 0xdb, 0xf2, 0x1d, 0x7c, 0x91, 0xe2, 0x28, 0x74, 0x9b, 0x8e, 0x1f, + 0x2e, 0x46, 0xee, 0x7c, 0x2b, 0x22, 0x17, 0x97, 0xc5, 0x7f, 0xdb, 0xad, 0x88, 0x50, 0x02, 0xef, + 0xf0, 0xce, 0xe1, 0x45, 0xdb, 0x5d, 0xa2, 0x24, 0x70, 0x29, 0xb6, 0xdd, 0x96, 0x6f, 0x0b, 0x46, + 0xd6, 0xc1, 0x06, 0x21, 0x8d, 0x26, 0x76, 0xd8, 0x8a, 0x6e, 0x18, 0x12, 0xea, 0x52, 0x9f, 0x84, + 0x31, 0x07, 0x5b, 0x87, 0xb7, 0x7c, 0x51, 0x84, 0x9f, 0x5f, 0xc2, 0x31, 0x75, 0x48, 0xd4, 0xc8, + 0x8c, 0x6d, 0xa9, 0x71, 0x8c, 0xa3, 0x0b, 0x38, 0xca, 0xec, 0x87, 0xa5, 0xf6, 0x1e, 0x21, 0xe7, + 0x17, 0x08, 0x39, 0x9f, 0x21, 0x8e, 0x48, 0x11, 0x11, 0x69, 0x62, 0x75, 0x7f, 0xbc, 0xa6, 0x8f, + 0x43, 0x9a, 0xd9, 0x3b, 0x52, 0xfb, 0xba, 0x4b, 0xdd, 0x05, 0xb7, 0x4d, 0x78, 0x54, 0x0a, 0xc0, + 0xe1, 0x05, 0x3f, 0x22, 0x61, 0x20, 0xbc, 0x45, 0xce, 0x21, 0x24, 0xf5, 0x36, 0x87, 0x11, 0xa9, + 0x75, 0x8b, 0x34, 0x7d, 0x6f, 0x79, 0xd1, 0xcf, 0x79, 0x6f, 0xf7, 0x86, 0xb8, 0x45, 0xc2, 0x18, + 0x8b, 0x51, 0x73, 0xe4, 0xd6, 0x9d, 0x61, 0xab, 0xc8, 0x01, 0x1b, 0xe3, 0x56, 0x96, 0x43, 0xc4, + 0xc0, 0x29, 0xb8, 0xd4, 0x19, 0xb9, 0x61, 0x39, 0x60, 0x43, 0xe8, 0xc6, 0xe4, 0x88, 0x2e, 0xb1, + 0x53, 0xe0, 0x21, 0x06, 0x6f, 0x54, 0x6e, 0xbe, 0x39, 0x7a, 0xf7, 0x74, 0x80, 0x3c, 0x12, 0x04, + 0x24, 0x74, 0x98, 0xfc, 0x7e, 0xfe, 0x77, 0x6a, 0x3a, 0xe9, 0x91, 0xa0, 0x45, 0x42, 0xe6, 0xa0, + 0x93, 0x15, 0x78, 0xb9, 0x11, 0xb5, 0x3c, 0x27, 0x79, 0xee, 0x95, 0x1b, 0x38, 0x2c, 0xf3, 0x37, + 0x38, 0xbe, 0x1b, 0x6c, 0xae, 0xef, 0x91, 0xf7, 0x67, 0x00, 0x98, 0x65, 0x7e, 0x9d, 0x61, 0x6e, + 0xc1, 0xeb, 0x06, 0x00, 0x35, 0x4c, 0x1f, 0xe7, 0x6f, 0x81, 0x63, 0xf6, 0xe6, 0xde, 0xc1, 0x1d, + 0xb2, 0x33, 0x47, 0x52, 0xd3, 0xd9, 0x70, 0x91, 0xcc, 0xf1, 0x84, 0xb4, 0xca, 0x5a, 0x28, 0xf4, + 0xe4, 0xda, 0xfa, 0xd0, 0x10, 0xd8, 0x1b, 0x2f, 0xc7, 0x14, 0x07, 0x55, 0x96, 0x6a, 0xbe, 0x87, + 0xab, 0xa9, 0xe5, 0xda, 0xfa, 0xd0, 0x01, 0xb8, 0xbf, 0xf3, 0x59, 0x0a, 0xae, 0x36, 0x30,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x8b, 0xa0, 0x5f, 0xd2, + 0x4a, 0xf4, 0x2b, 0x26, 0xd8, 0x33, 0x87, 0xe3, 0xa4, 0xe8, 0x4e, 0xd5, 0x03, 0x3f, 0x7c, 0x10, + 0x2f, 0xc3, 0x71, 0x45, 0xf2, 0x1b, 0x81, 0xd6, 0x71, 0x55, 0x0d, 0x36, 0x22, 0xd1, 0xa5, 0x02, + 0xa4, 0x18, 0xb7, 0x8e, 0x6a, 0x48, 0xc1, 0x26, 0x6b, 0x4c, 0xcb, 0xe7, 0xf1, 0x72, 0x9e, 0x13, + 0x6f, 0x98, 0x60, 0xb0, 0x86, 0xe9, 0x74, 0x76, 0x28, 0x51, 0xef, 0x04, 0x19, 0x42, 0xa3, 0x13, + 0x64, 0x10, 0x74, 0x99, 0x69, 0x71, 0x1c, 0x1c, 0x53, 0xd2, 0x82, 0x44, 0x8d, 0xe4, 0x7f, 0xed, + 0x83, 0x93, 0xb4, 0x15, 0x4e, 0xc0, 0x13, 0xaa, 0xb2, 0xa4, 0x8b, 0xe7, 0xa7, 0x32, 0xf8, 0xb5, + 0x09, 0x6e, 0x15, 0x14, 0x49, 0x27, 0xea, 0x58, 0x39, 0x65, 0x36, 0x02, 0xd5, 0x53, 0x66, 0x23, + 0x12, 0x7d, 0x54, 0xac, 0x4c, 0x53, 0x70, 0xb2, 0x67, 0x99, 0x9c, 0x95, 0xd0, 0x0d, 0xf0, 0x2a, + 0xbc, 0x6a, 0x82, 0x1b, 0x05, 0xb5, 0xa0, 0xa3, 0xa9, 0x92, 0x35, 0xac, 0xab, 0x0e, 0xfa, 0xaa, + 0x58, 0x55, 0x1e, 0x82, 0x0f, 0xf4, 0xab, 0x8a, 0xb3, 0x92, 0x1e, 0xb3, 0x56, 0xe1, 0x75, 0x13, + 0xec, 0x15, 0xf4, 0xb9, 0xdf, 0x6f, 0xe2, 0x69, 0x12, 0x52, 0x1c, 0x52, 0x58, 0xd5, 0x94, 0x4a, + 0xc0, 0x5a, 0x13, 0xba, 0xaa, 0x09, 0x60, 0xf4, 0x5d, 0xb1, 0x02, 0x3e, 0x05, 0x9f, 0xd8, 0x39, + 0x01, 0x1d, 0x76, 0xfc, 0x2f, 0x7b, 0xa9, 0x64, 0x7f, 0x19, 0xe0, 0x86, 0x1a, 0xa6, 0x73, 0xa4, + 0x89, 0x63, 0x78, 0x44, 0xb5, 0x87, 0x33, 0x6b, 0xab, 0xac, 0xdc, 0xb8, 0x99, 0x39, 0x7a, 0x93, + 0x69, 0x34, 0x06, 0x46, 0xb4, 0x34, 0x4a, 0xbe, 0xd3, 0x48, 0xf5, 0x19, 0x87, 0x47, 0x75, 0xf5, + 0x49, 0x16, 0x86, 0xff, 0xf0, 0xe9, 0x9b, 0x39, 0x08, 0x0f, 0x6b, 0x90, 0xb7, 0x8e, 0xe8, 0x70, + 0x47, 0xef, 0x15, 0x47, 0xfd, 0x24, 0xbc, 0xb7, 0x27, 0xea, 0x59, 0xb7, 0x79, 0xdd, 0x04, 0x80, + 0xcf, 0x93, 0x89, 0x08, 0x15, 0xad, 0xa9, 0xb5, 0x07, 0x29, 0xae, 0xf6, 0x23, 0x85, 0x7c, 0xf7, + 0x46, 0xbd, 0x25, 0x42, 0xbe, 0x7b, 0xbf, 0x62, 0x02, 0xc0, 0x87, 0xad, 0xa2, 0x93, 0xe2, 0x4a, + 0xa1, 0x4a, 0x9c, 0x2c, 0xf5, 0x97, 0x17, 0x6f, 0x99, 0x00, 0xf0, 0x99, 0x5b, 0x2b, 0x2f, 0x72, + 0x88, 0xa6, 0x1a, 0xd7, 0x8a, 0x55, 0xc3, 0xea, 0x4b, 0x8d, 0xce, 0xf4, 0x60, 0x9b, 0x0f, 0xff, + 0x1e, 0xac, 0x7c, 0x62, 0x4f, 0xed, 0xd5, 0x4f, 0xec, 0x29, 0x00, 0xbd, 0xcd, 0x64, 0x39, 0x06, + 0xc6, 0xf4, 0x36, 0x16, 0x0e, 0x96, 0xf6, 0x8e, 0x13, 0x70, 0x5c, 0x7b, 0x5b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0x5d, 0x69, 0xf8, 0xf4, 0xdc, 0xd2, + 0x82, 0xed, 0x91, 0xc0, 0x61, 0x34, 0xdb, 0xb7, 0x4c, 0xb6, 0xbc, 0xa1, 0xb3, 0xb0, 0x2b, 0xb9, + 0x58, 0x32, 0xfa, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x33, 0x57, 0x9d, 0xa3, 0x26, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -166,6 +168,7 @@ type InfraProxyClient interface { GetRole(ctx context.Context, in *request.Role, opts ...grpc.CallOption) (*response.Role, error) CreateRole(ctx context.Context, in *request.CreateRole, opts ...grpc.CallOption) (*response.Role, error) DeleteRole(ctx context.Context, in *request.Role, opts ...grpc.CallOption) (*response.Role, error) + UpdateRole(ctx context.Context, in *request.UpdateRole, opts ...grpc.CallOption) (*response.Role, error) GetClients(ctx context.Context, in *request.Clients, opts ...grpc.CallOption) (*response.Clients, error) GetClient(ctx context.Context, in *request.Client, opts ...grpc.CallOption) (*response.Client, error) GetDataBags(ctx context.Context, in *request.DataBags, opts ...grpc.CallOption) (*response.DataBags, error) @@ -368,6 +371,15 @@ func (c *infraProxyClient) DeleteRole(ctx context.Context, in *request.Role, opt return out, nil } +func (c *infraProxyClient) UpdateRole(ctx context.Context, in *request.UpdateRole, opts ...grpc.CallOption) (*response.Role, error) { + out := new(response.Role) + err := c.cc.Invoke(ctx, "/chef.automate.api.infra_proxy.InfraProxy/UpdateRole", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *infraProxyClient) GetClients(ctx context.Context, in *request.Clients, opts ...grpc.CallOption) (*response.Clients, error) { out := new(response.Clients) err := c.cc.Invoke(ctx, "/chef.automate.api.infra_proxy.InfraProxy/GetClients", in, out, opts...) @@ -498,6 +510,7 @@ type InfraProxyServer interface { GetRole(context.Context, *request.Role) (*response.Role, error) CreateRole(context.Context, *request.CreateRole) (*response.Role, error) DeleteRole(context.Context, *request.Role) (*response.Role, error) + UpdateRole(context.Context, *request.UpdateRole) (*response.Role, error) GetClients(context.Context, *request.Clients) (*response.Clients, error) GetClient(context.Context, *request.Client) (*response.Client, error) GetDataBags(context.Context, *request.DataBags) (*response.DataBags, error) @@ -576,6 +589,9 @@ func (*UnimplementedInfraProxyServer) CreateRole(ctx context.Context, req *reque func (*UnimplementedInfraProxyServer) DeleteRole(ctx context.Context, req *request.Role) (*response.Role, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented") } +func (*UnimplementedInfraProxyServer) UpdateRole(ctx context.Context, req *request.UpdateRole) (*response.Role, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented") +} func (*UnimplementedInfraProxyServer) GetClients(ctx context.Context, req *request.Clients) (*response.Clients, error) { return nil, status.Errorf(codes.Unimplemented, "method GetClients not implemented") } @@ -977,6 +993,24 @@ func _InfraProxy_DeleteRole_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _InfraProxy_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(request.UpdateRole) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraProxyServer).UpdateRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/chef.automate.api.infra_proxy.InfraProxy/UpdateRole", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraProxyServer).UpdateRole(ctx, req.(*request.UpdateRole)) + } + return interceptor(ctx, in, info, handler) +} + func _InfraProxy_GetClients_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.Clients) if err := dec(in); err != nil { @@ -1277,6 +1311,10 @@ var _InfraProxy_serviceDesc = grpc.ServiceDesc{ MethodName: "DeleteRole", Handler: _InfraProxy_DeleteRole_Handler, }, + { + MethodName: "UpdateRole", + Handler: _InfraProxy_UpdateRole_Handler, + }, { MethodName: "GetClients", Handler: _InfraProxy_GetClients_Handler, diff --git a/api/external/infra_proxy/infra_proxy.pb.gw.go b/api/external/infra_proxy/infra_proxy.pb.gw.go index 1a4d36912ed4..e160b4cd5a33 100644 --- a/api/external/infra_proxy/infra_proxy.pb.gw.go +++ b/api/external/infra_proxy/infra_proxy.pb.gw.go @@ -1534,6 +1534,120 @@ func local_request_InfraProxy_DeleteRole_0(ctx context.Context, marshaler runtim } +func request_InfraProxy_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, client InfraProxyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq request.UpdateRole + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["server_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "server_id") + } + + protoReq.ServerId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "server_id", err) + } + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.UpdateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_InfraProxy_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, server InfraProxyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq request.UpdateRole + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["server_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "server_id") + } + + protoReq.ServerId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "server_id", err) + } + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.UpdateRole(ctx, &protoReq) + return msg, metadata, err + +} + func request_InfraProxy_GetClients_0(ctx context.Context, marshaler runtime.Marshaler, client InfraProxyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq request.Clients var metadata runtime.ServerMetadata @@ -3125,6 +3239,26 @@ func RegisterInfraProxyHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("PUT", pattern_InfraProxy_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_InfraProxy_UpdateRole_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_InfraProxy_UpdateRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_InfraProxy_GetClients_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -3806,6 +3940,26 @@ func RegisterInfraProxyHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("PUT", pattern_InfraProxy_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_InfraProxy_UpdateRole_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_InfraProxy_UpdateRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_InfraProxy_GetClients_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -4090,6 +4244,8 @@ var ( pattern_InfraProxy_DeleteRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"api", "v0", "infra", "servers", "server_id", "orgs", "org_id", "roles", "name"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_InfraProxy_UpdateRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"api", "v0", "infra", "servers", "server_id", "orgs", "org_id", "roles", "name"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_InfraProxy_GetClients_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"api", "v0", "infra", "servers", "server_id", "orgs", "org_id", "clients"}, "", runtime.AssumeColonVerbOpt(true))) pattern_InfraProxy_GetClient_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"api", "v0", "infra", "servers", "server_id", "orgs", "org_id", "clients", "name"}, "", runtime.AssumeColonVerbOpt(true))) @@ -4156,6 +4312,8 @@ var ( forward_InfraProxy_DeleteRole_0 = runtime.ForwardResponseMessage + forward_InfraProxy_UpdateRole_0 = runtime.ForwardResponseMessage + forward_InfraProxy_GetClients_0 = runtime.ForwardResponseMessage forward_InfraProxy_GetClient_0 = runtime.ForwardResponseMessage diff --git a/api/external/infra_proxy/infra_proxy.pb.policy.go b/api/external/infra_proxy/infra_proxy.pb.policy.go index 1aed3e4fd01e..de088cd1ab43 100644 --- a/api/external/infra_proxy/infra_proxy.pb.policy.go +++ b/api/external/infra_proxy/infra_proxy.pb.policy.go @@ -323,6 +323,29 @@ func init() { } return "" }) + policy.MapMethodTo("/chef.automate.api.infra_proxy.InfraProxy/UpdateRole", "infra:infraServers:{server_id}:orgs:{org_id}:roles", "infra:infraServers:update", "PUT", "/api/v0/infra/servers/{server_id}/orgs/{org_id}/roles/{name}", func(unexpandedResource string, input interface{}) string { + if m, ok := input.(*request.UpdateRole); ok { + return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string { + switch want { + case "org_id": + return m.OrgId + case "server_id": + return m.ServerId + case "name": + return m.Name + case "description": + return m.Description + case "default_attributes": + return m.DefaultAttributes + case "override_attributes": + return m.OverrideAttributes + default: + return "" + } + }) + } + return "" + }) policy.MapMethodTo("/chef.automate.api.infra_proxy.InfraProxy/GetClients", "infra:infraServers:{server_id}:orgs:{org_id}:clients", "infra:infraServers:get", "GET", "/api/v0/infra/servers/{server_id}/orgs/{org_id}/clients", func(unexpandedResource string, input interface{}) string { if m, ok := input.(*request.Clients); ok { return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string { diff --git a/api/external/infra_proxy/infra_proxy.proto b/api/external/infra_proxy/infra_proxy.proto index adf4bcb7497a..4e2e86940b4d 100644 --- a/api/external/infra_proxy/infra_proxy.proto +++ b/api/external/infra_proxy/infra_proxy.proto @@ -139,6 +139,12 @@ service InfraProxy { option (chef.automate.api.iam.policy).resource = "infra:infraServers:{server_id}:orgs:{org_id}:roles"; option (chef.automate.api.iam.policy).action = "infra:infraServers:update"; }; + rpc UpdateRole (infra_proxy.request.UpdateRole) returns (infra_proxy.response.Role) { + option (google.api.http).put = "/api/v0/infra/servers/{server_id}/orgs/{org_id}/roles/{name}"; + option (google.api.http).body = "*"; + option (chef.automate.api.iam.policy).resource = "infra:infraServers:{server_id}:orgs:{org_id}:roles"; + option (chef.automate.api.iam.policy).action = "infra:infraServers:update"; + }; rpc GetClients (infra_proxy.request.Clients) returns (infra_proxy.response.Clients) { option (google.api.http).get = "/api/v0/infra/servers/{server_id}/orgs/{org_id}/clients"; diff --git a/api/external/infra_proxy/infra_proxy.swagger.json b/api/external/infra_proxy/infra_proxy.swagger.json index 4546900ad7c3..ac1d781d6535 100644 --- a/api/external/infra_proxy/infra_proxy.swagger.json +++ b/api/external/infra_proxy/infra_proxy.swagger.json @@ -1119,6 +1119,51 @@ "tags": [ "InfraProxy" ] + }, + "put": { + "operationId": "UpdateRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/chef.automate.api.infra_proxy.response.Role" + } + } + }, + "parameters": [ + { + "name": "server_id", + "description": "Chef Infra Server ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "org_id", + "description": "Chef organization ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "name", + "description": "Role name.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/chef.automate.api.infra_proxy.request.UpdateRole" + } + } + ], + "tags": [ + "InfraProxy" + ] } }, "/api/v0/infra/version": { @@ -1330,6 +1375,49 @@ } } }, + "chef.automate.api.infra_proxy.request.UpdateRole": { + "type": "object", + "properties": { + "org_id": { + "type": "string", + "description": "Chef organization ID." + }, + "server_id": { + "type": "string", + "description": "Chef Infra Server ID." + }, + "name": { + "type": "string", + "description": "Role name." + }, + "description": { + "type": "string", + "description": "Role description." + }, + "default_attributes": { + "type": "string", + "description": "Role default attributes." + }, + "override_attributes": { + "type": "string", + "description": "Role override attributes." + }, + "run_list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Role run list." + }, + "env_run_lists": { + "type": "array", + "items": { + "$ref": "#/definitions/chef.automate.api.infra_proxy.request.EnvRunList" + }, + "description": "Environment based run list." + } + } + }, "chef.automate.api.infra_proxy.request.UpdateServer": { "type": "object", "properties": { diff --git a/api/external/infra_proxy/request/roles.pb.go b/api/external/infra_proxy/request/roles.pb.go index e3fc0c716c84..74d65591e0f1 100644 --- a/api/external/infra_proxy/request/roles.pb.go +++ b/api/external/infra_proxy/request/roles.pb.go @@ -230,6 +230,109 @@ func (m *CreateRole) GetEnvRunLists() []*EnvRunList { return nil } +type UpdateRole struct { + // Chef organization ID. + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + // Chef Infra Server ID. + ServerId string `protobuf:"bytes,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` + // Role name. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // Role description. + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // Role default attributes. + DefaultAttributes string `protobuf:"bytes,5,opt,name=default_attributes,json=defaultAttributes,proto3" json:"default_attributes,omitempty"` + // Role override attributes. + OverrideAttributes string `protobuf:"bytes,6,opt,name=override_attributes,json=overrideAttributes,proto3" json:"override_attributes,omitempty"` + // Role run list. + RunList []string `protobuf:"bytes,7,rep,name=run_list,json=runList,proto3" json:"run_list,omitempty"` + // Environment based run list. + EnvRunLists []*EnvRunList `protobuf:"bytes,8,rep,name=env_run_lists,json=envRunLists,proto3" json:"env_run_lists,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateRole) Reset() { *m = UpdateRole{} } +func (m *UpdateRole) String() string { return proto.CompactTextString(m) } +func (*UpdateRole) ProtoMessage() {} +func (*UpdateRole) Descriptor() ([]byte, []int) { + return fileDescriptor_f4febb01f7e33d74, []int{3} +} + +func (m *UpdateRole) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateRole.Unmarshal(m, b) +} +func (m *UpdateRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateRole.Marshal(b, m, deterministic) +} +func (m *UpdateRole) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateRole.Merge(m, src) +} +func (m *UpdateRole) XXX_Size() int { + return xxx_messageInfo_UpdateRole.Size(m) +} +func (m *UpdateRole) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateRole.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateRole proto.InternalMessageInfo + +func (m *UpdateRole) GetOrgId() string { + if m != nil { + return m.OrgId + } + return "" +} + +func (m *UpdateRole) GetServerId() string { + if m != nil { + return m.ServerId + } + return "" +} + +func (m *UpdateRole) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *UpdateRole) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *UpdateRole) GetDefaultAttributes() string { + if m != nil { + return m.DefaultAttributes + } + return "" +} + +func (m *UpdateRole) GetOverrideAttributes() string { + if m != nil { + return m.OverrideAttributes + } + return "" +} + +func (m *UpdateRole) GetRunList() []string { + if m != nil { + return m.RunList + } + return nil +} + +func (m *UpdateRole) GetEnvRunLists() []*EnvRunList { + if m != nil { + return m.EnvRunLists + } + return nil +} + type EnvRunList struct { // Environment name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -244,7 +347,7 @@ func (m *EnvRunList) Reset() { *m = EnvRunList{} } func (m *EnvRunList) String() string { return proto.CompactTextString(m) } func (*EnvRunList) ProtoMessage() {} func (*EnvRunList) Descriptor() ([]byte, []int) { - return fileDescriptor_f4febb01f7e33d74, []int{3} + return fileDescriptor_f4febb01f7e33d74, []int{4} } func (m *EnvRunList) XXX_Unmarshal(b []byte) error { @@ -283,6 +386,7 @@ func init() { proto.RegisterType((*Roles)(nil), "chef.automate.api.infra_proxy.request.Roles") proto.RegisterType((*Role)(nil), "chef.automate.api.infra_proxy.request.Role") proto.RegisterType((*CreateRole)(nil), "chef.automate.api.infra_proxy.request.CreateRole") + proto.RegisterType((*UpdateRole)(nil), "chef.automate.api.infra_proxy.request.UpdateRole") proto.RegisterType((*EnvRunList)(nil), "chef.automate.api.infra_proxy.request.EnvRunList") } @@ -291,27 +395,27 @@ func init() { } var fileDescriptor_f4febb01f7e33d74 = []byte{ - // 339 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xcf, 0x4b, 0xeb, 0x40, - 0x10, 0xc7, 0xe9, 0xef, 0x76, 0xca, 0x3b, 0xbc, 0x7d, 0x3c, 0xc8, 0xe3, 0x5d, 0x42, 0x40, 0xe8, - 0x41, 0x77, 0x51, 0x4f, 0xd2, 0x93, 0x8a, 0x87, 0x82, 0x78, 0x08, 0x78, 0xf1, 0x12, 0xb6, 0xcd, - 0xb4, 0x5d, 0x48, 0x77, 0xe3, 0xec, 0x24, 0xd4, 0xff, 0xd0, 0x3f, 0x4b, 0x92, 0xfe, 0x30, 0x9e, - 0x14, 0xf1, 0xb6, 0xcc, 0x67, 0x3e, 0xc3, 0x97, 0xd9, 0x81, 0x53, 0x9d, 0x1b, 0x85, 0x5b, 0x46, - 0xb2, 0x3a, 0x53, 0xc6, 0x2e, 0x49, 0x27, 0x39, 0xb9, 0xed, 0x8b, 0x22, 0x7c, 0x2e, 0xd0, 0xb3, - 0x22, 0x97, 0xa1, 0x97, 0x39, 0x39, 0x76, 0xe2, 0x64, 0xb1, 0xc6, 0xa5, 0xd4, 0x05, 0xbb, 0x8d, - 0x66, 0x94, 0x3a, 0x37, 0xb2, 0xa1, 0xc8, 0xbd, 0x12, 0x4d, 0xa1, 0x17, 0x57, 0x96, 0xf8, 0x0b, - 0x7d, 0x47, 0xab, 0xc4, 0xa4, 0x41, 0x2b, 0x6c, 0x4d, 0x46, 0x71, 0xcf, 0xd1, 0x6a, 0x96, 0x8a, - 0xff, 0x30, 0xf2, 0x48, 0x25, 0x52, 0x45, 0xda, 0x35, 0x19, 0xee, 0x0a, 0xb3, 0x34, 0x7a, 0x80, - 0x6e, 0x25, 0x7f, 0xc7, 0x15, 0x02, 0xba, 0x56, 0x6f, 0x30, 0xe8, 0xd4, 0xf5, 0xfa, 0x1d, 0xbd, - 0xb6, 0x01, 0x6e, 0x09, 0x35, 0xe3, 0x4f, 0x8e, 0x15, 0x21, 0x8c, 0x53, 0xf4, 0x0b, 0x32, 0x39, - 0x1b, 0x67, 0x83, 0x6e, 0x8d, 0x9a, 0x25, 0x71, 0x06, 0x22, 0xc5, 0xa5, 0x2e, 0x32, 0x4e, 0x34, - 0x33, 0x99, 0x79, 0xc1, 0xe8, 0x83, 0x5e, 0xdd, 0xf8, 0x7b, 0x4f, 0xae, 0x8f, 0x40, 0x28, 0xf8, - 0xe3, 0x4a, 0x24, 0x32, 0x29, 0x36, 0xfb, 0xfb, 0x75, 0xbf, 0x38, 0xa0, 0x86, 0xf0, 0x0f, 0x86, - 0x54, 0xd8, 0x24, 0x33, 0x9e, 0x83, 0x41, 0xd8, 0x99, 0x8c, 0xe2, 0x01, 0x15, 0xf6, 0xde, 0x78, - 0x16, 0x8f, 0xf0, 0x0b, 0x6d, 0x99, 0x1c, 0xb0, 0x0f, 0x86, 0x61, 0x67, 0x32, 0xbe, 0x38, 0x97, - 0x5f, 0xfa, 0x3f, 0x79, 0x67, 0xcb, 0x78, 0x37, 0x29, 0x1e, 0xe3, 0xf1, 0xed, 0xa3, 0x29, 0xc0, - 0x3b, 0x3a, 0x6e, 0xa5, 0xd5, 0xd8, 0x4a, 0x33, 0x53, 0xfb, 0x43, 0xa6, 0x9b, 0xe9, 0xd3, 0xd5, - 0xca, 0xf0, 0xba, 0x98, 0xcb, 0x85, 0xdb, 0xa8, 0x2a, 0x88, 0x3a, 0x04, 0x51, 0x9f, 0x1d, 0xe1, - 0xbc, 0x5f, 0xdf, 0xdf, 0xe5, 0x5b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbd, 0xd7, 0xbd, 0x84, 0xaf, - 0x02, 0x00, 0x00, + // 346 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x93, 0x3f, 0x4b, 0x03, 0x41, + 0x10, 0xc5, 0xc9, 0xff, 0x64, 0x82,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, 0xa9, 0x8b, 0xa5, + 0x73, 0xa4, 0xa6, 0xb9, 0x43, 0x1b, 0xb4, 0xbc, 0xf0, 0x70, 0x4b, 0x6e, 0xf7, 0x80, 0x09, 0x38, + 0x32, 0x05, 0x12, 0xa9, 0x04, 0xab, 0xfa, 0xb6, 0xd7, 0xb3, 0x1d, 0xaa, 0x18, 0x4e, 0xa0, 0x4b, + 0xb9, 0x8e, 0x53, 0x65, 0x5d, 0xd0, 0x09, 0x1b, 0xc3, 0x5e, 0xd4, 0xa1, 0x5c, 0x3f, 0x2a, 0xeb, + 0xd8, 0x04, 0x0e, 0x50, 0x17, 0xf1, 0x0e, 0xdb, 0xa0, 0x1b, 0x36, 0x86, 0xfd, 0xab, 0x4b, 0xfe, + 0xad, 0xff, 0xe3, 0x0f, 0xba, 0x88, 0x36, 0x9b, 0xa2, 0x3e, 0xee, 0xdf, 0xd6, 0x57, 0x39, 0xc9, + 0x92, 0xff, 0x2a, 0x7f, 0x5f, 0xe5, 0x08, 0xe0, 0x03, 0xed, 0x5b, 0xa9, 0x55, 0x5a, 0xa9, 0x66, + 0xaa, 0x7f, 0xca, 0x74, 0x37, 0x7a, 0xbe, 0x59, 0x28, 0xb7, 0xcc, 0xa7, 0x7c, 0x66, 0x56, 0xa2, + 0x0c, 0x22, 0x76, 0x41, 0xc4, 0x57, 0xf7, 0x3c, 0x6d, 0xfb, 0x53, 0xbe, 0x7e, 0x0f, 0x00, 0x00, + 0xff, 0xff, 0x11, 0xfd, 0xb1, 0xc6, 0xfa, 0x03, 0x00, 0x00, } diff --git a/api/external/infra_proxy/request/roles.proto b/api/external/infra_proxy/request/roles.proto index 3ac105c45f55..5f9c03198204 100644 --- a/api/external/infra_proxy/request/roles.proto +++ b/api/external/infra_proxy/request/roles.proto @@ -38,6 +38,25 @@ message CreateRole { repeated EnvRunList env_run_lists = 8; } +message UpdateRole { + // Chef organization ID. + string org_id = 1; + // Chef Infra Server ID. + string server_id = 2; + // Role name. + string name = 3; + // Role description. + string description = 4; + // Role default attributes. + string default_attributes = 5; + // Role override attributes. + string override_attributes = 6; + // Role run list. + repeated string run_list = 7; + // Environment based run list. + repeated EnvRunList env_run_lists = 8; +} + message EnvRunList { // Environment name. string name = 1; diff --git a/api/interservice/infra_proxy/request/roles.pb.go b/api/interservice/infra_proxy/request/roles.pb.go index 66a98973027a..59fcd8664336 100644 --- a/api/interservice/infra_proxy/request/roles.pb.go +++ b/api/interservice/infra_proxy/request/roles.pb.go @@ -230,6 +230,109 @@ func (m *CreateRole) GetEnvRunLists() []*EnvRunList { return nil } +type UpdateRole struct { + // Chef organization ID. + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty" toml:"org_id,omitempty" mapstructure:"org_id,omitempty"` + // Chef Infra Server ID. + ServerId string `protobuf:"bytes,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty" toml:"server_id,omitempty" mapstructure:"server_id,omitempty"` + // Role name. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"` + // Role description. + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty" toml:"description,omitempty" mapstructure:"description,omitempty"` + // Role default attributes. + DefaultAttributes string `protobuf:"bytes,5,opt,name=default_attributes,json=defaultAttributes,proto3" json:"default_attributes,omitempty" toml:"default_attributes,omitempty" mapstructure:"default_attributes,omitempty"` + // Role override attributes. + OverrideAttributes string `protobuf:"bytes,6,opt,name=override_attributes,json=overrideAttributes,proto3" json:"override_attributes,omitempty" toml:"override_attributes,omitempty" mapstructure:"override_attributes,omitempty"` + // Role run list. + RunList []string `protobuf:"bytes,7,rep,name=run_list,json=runList,proto3" json:"run_list,omitempty" toml:"run_list,omitempty" mapstructure:"run_list,omitempty"` + // Environment based run list. + EnvRunLists []*EnvRunList `protobuf:"bytes,8,rep,name=env_run_lists,json=envRunLists,proto3" json:"env_run_lists,omitempty" toml:"env_run_lists,omitempty" mapstructure:"env_run_lists,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"` + XXX_unrecognized []byte `json:"-" toml:"-" mapstructure:"-,omitempty"` + XXX_sizecache int32 `json:"-" toml:"-" mapstructure:"-,omitempty"` +} + +func (m *UpdateRole) Reset() { *m = UpdateRole{} } +func (m *UpdateRole) String() string { return proto.CompactTextString(m) } +func (*UpdateRole) ProtoMessage() {} +func (*UpdateRole) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc8a5c34f7a8836, []int{3} +} + +func (m *UpdateRole) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateRole.Unmarshal(m, b) +} +func (m *UpdateRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateRole.Marshal(b, m, deterministic) +} +func (m *UpdateRole) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateRole.Merge(m, src) +} +func (m *UpdateRole) XXX_Size() int { + return xxx_messageInfo_UpdateRole.Size(m) +} +func (m *UpdateRole) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateRole.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateRole proto.InternalMessageInfo + +func (m *UpdateRole) GetOrgId() string { + if m != nil { + return m.OrgId + } + return "" +} + +func (m *UpdateRole) GetServerId() string { + if m != nil { + return m.ServerId + } + return "" +} + +func (m *UpdateRole) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *UpdateRole) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *UpdateRole) GetDefaultAttributes() string { + if m != nil { + return m.DefaultAttributes + } + return "" +} + +func (m *UpdateRole) GetOverrideAttributes() string { + if m != nil { + return m.OverrideAttributes + } + return "" +} + +func (m *UpdateRole) GetRunList() []string { + if m != nil { + return m.RunList + } + return nil +} + +func (m *UpdateRole) GetEnvRunLists() []*EnvRunList { + if m != nil { + return m.EnvRunLists + } + return nil +} + type EnvRunList struct { // Environment name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"` @@ -244,7 +347,7 @@ func (m *EnvRunList) Reset() { *m = EnvRunList{} } func (m *EnvRunList) String() string { return proto.CompactTextString(m) } func (*EnvRunList) ProtoMessage() {} func (*EnvRunList) Descriptor() ([]byte, []int) { - return fileDescriptor_2bc8a5c34f7a8836, []int{3} + return fileDescriptor_2bc8a5c34f7a8836, []int{4} } func (m *EnvRunList) XXX_Unmarshal(b []byte) error { @@ -283,6 +386,7 @@ func init() { proto.RegisterType((*Roles)(nil), "chef.automate.domain.infra_proxy.request.Roles") proto.RegisterType((*Role)(nil), "chef.automate.domain.infra_proxy.request.Role") proto.RegisterType((*CreateRole)(nil), "chef.automate.domain.infra_proxy.request.CreateRole") + proto.RegisterType((*UpdateRole)(nil), "chef.automate.domain.infra_proxy.request.UpdateRole") proto.RegisterType((*EnvRunList)(nil), "chef.automate.domain.infra_proxy.request.EnvRunList") } @@ -291,27 +395,28 @@ func init() { } var fileDescriptor_2bc8a5c34f7a8836 = []byte{ - // 341 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x4f, 0x4b, 0xf3, 0x40, - 0x10, 0xc6, 0xe9, 0xff, 0x76, 0xca, 0x7b, 0x78, 0xf7, 0xe5, 0x85, 0x88, 0x97, 0x90, 0x53, 0x2e, - 0xee, 0x8a, 0x7a, 0x2b, 0x22, 0x2a, 0x1e, 0x0a, 0xe2, 0x21, 0x27, 0xf1, 0x12, 0xb6, 0xc9, 0xb4, - 0x5d, 0x68, 0x76, 0xe3, 0xec, 0x26, 0xe8, 0x67, 0xf4, 0x4b, 0x49, 0xb6, 0x7f, 0x8c, 0xb7, 0x22, - 0xde, 0x86, 0xf9, 0x3d, 0xcf, 0xec, 0xc3, 0xec, 0xc0, 0xb9, 0x2c, 0x95, 0x50, 0xda, 0x21, 0x59, - 0xa4, 0x5a, 0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, 0xee, 0xb1, 0x0d, 0xc6, 0x61, 0x2f, 0x9e, - 0x5e, 0x5c, 0xf1, 0x63, 0xbf, 0x90, 0x3f, 0xe8, 0x3a, 0xd9, 0x0e, 0x4b, 0xa6, 0x78, 0xa8, 0x6d, - 0x34, 0x03, 0xf8, 0x42, 0x87, 0xc5, 0x74, 0x5a, 0x8b, 0x69, 0xc7, 0xea, 0x7e, 0x8b, 0x75, 0x77, - 0xf3, 0x72, 0xbd, 0x52, 0x6e, 0x5d, 0x2d, 0x78, 0x66, 0x0a, 0xd1, 0x64, 0x11, 0xfb, 0x2c, 0xe2, - 0x98, 0x73, 0x5c, 0x0c, 0xfd, 0x25, 0x5e, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xb5, 0xda, - 0x9f, 0xbd, 0x02, 0x00, 0x00, + // 354 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x93, 0x4f, 0x6b, 0x1b, 0x31, + 0x10, 0xc5, 0xf1, 0x7f, 0x7b, 0x4c, 0x0f, 0x55, 0x29, 0x6c, 0xe9, 0x65, 0xf1, 0x69, 0x2f, 0x95, + 0x4a, 0xdb, 0x9b, 0x29, 0xa5, 0x09, 0x39, 0x18, 0x42, 0x0e, 0x0b, 0x81, 0x90, 0xcb, 0x22, 0xaf, + 0xc6, 0xb6, 0xc0, 0x2b, 0x6d, 0x46, 0xda, 0x25, 0xf9, 0x8c, 0xf9, 0x52, 0x61, 0xe5, 0x3f, 0xd9, + 0xdc, 0x4c, 0xf0, 0x31, 0xb7, 0x61, 0x7e, 0xf3, 0x46, 0x8f, 0x27, 0x06, 0x7e, 0xca, 0x52, 0x0b, + 0x6d, 0x3c, 0x92, 0x43, 0xaa, 0x75, 0x8e, 0x42, 0x9b, 0x15, 0xc9, 0xac, 0x24, 0xfb, 0xf8, 0x24, + 0x08, 0x1f, 0x2a, 0x74, 0x5e, 0x90,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0x99, 0x3a, 0xdd, 0x2d, 0x4b, + 0xa7, 0x78, 0xac, 0x5d, 0x48, 0xf3, 0xb6, 0x54, 0x1f, 0x69, 0x9e, 0x25, 0xcd, 0x39, 0xc0, 0x2b, + 0x3a, 0x06, 0xd3, 0x69, 0x05, 0xd3, 0xb6, 0xd5, 0x7d, 0x63, 0xeb, 0xe2, 0xdf, 0xfd, 0xdf, 0xb5, + 0xf6, 0x9b, 0x6a, 0xc9, 0x73, 0x5b, 0x88, 0xc6, 0x8b, 0x38, 0x78, 0x11, 0xa7, 0x1c, 0xf7, 0x72, + 0x18, 0xee, 0xfa, 0xf7, 0x4b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2e, 0x49, 0xb0, 0x3f, 0x0b, 0x04, + 0x00, 0x00, } diff --git a/api/interservice/infra_proxy/request/roles.proto b/api/interservice/infra_proxy/request/roles.proto index 35dc80d9bf4d..987189edcece 100644 --- a/api/interservice/infra_proxy/request/roles.proto +++ b/api/interservice/infra_proxy/request/roles.proto @@ -38,6 +38,25 @@ message CreateRole { repeated EnvRunList env_run_lists = 8; } +message UpdateRole { + // Chef organization ID. + string org_id = 1; + // Chef Infra Server ID. + string server_id = 2; + // Role name. + string name = 3; + // Role description. + string description = 4; + // Role default attributes. + string default_attributes = 5; + // Role override attributes. + string override_attributes = 6; + // Role run list. + repeated string run_list = 7; + // Environment based run list. + repeated EnvRunList env_run_lists = 8; +} + message EnvRunList { // Environment name. string name = 1; diff --git a/api/interservice/infra_proxy/service/infra_proxy.pb.go b/api/interservice/infra_proxy/service/infra_proxy.pb.go index cc57dbc4da2c..90e363b8cc9d 100644 --- a/api/interservice/infra_proxy/service/infra_proxy.pb.go +++ b/api/interservice/infra_proxy/service/infra_proxy.pb.go @@ -32,62 +32,62 @@ func init() { } var fileDescriptor_59a1fd4cbd8b9945 = []byte{ - // 865 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x98, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0x37, 0x97, 0x6a, 0xc7, 0xb6, 0xd6, 0x11, 0x3c, 0xec, 0x45, 0xd8, 0x93, 0x1e, 0xdc, - 0x4d, 0x93, 0x34, 0x29, 0x4a, 0x95, 0xfe, 0xd0, 0x50, 0x04, 0x5b, 0x2a, 0x7a, 0xf0, 0x22, 0x9b, - 0xe4, 0x25, 0x1d, 0x9a, 0xcc, 0xc4, 0xd9, 0x49, 0x49, 0x10, 0x04, 0x41, 0xf0, 0x24, 0x78, 0xf5, - 0x0f, 0xf3, 0xff, 0x91, 0xdd, 0xd9, 0x1f, 0x93, 0x6d, 0x69, 0xe7, 0xed, 0xa1, 0x9e, 0xc2, 0x86, - 0xfd, 0xec, 0xf7, 0x3b, 0xef, 0x7d, 0xe7, 0x65, 0x36, 0xa4, 0x1d, 0x4e, 0x59, 0xc0, 0xb8, 0x02, - 0x19, 0x81, 0xbc, 0x60, 0x7d, 0x08, 0x18, 0x1f, 0xca, 0xf0, 0xf3, 0x54, 0x8a, 0xf9, 0x22, 0xb8, - 0xe2, 0x3b, 0x7f, 0x2a, 0x85, 0x12, 0xf4, 0x49, 0xff, 0x0c, 0x86, 0x7e, 0x38, 0x53, 0x62, 0x12, - 0x2a, 0xf0, 0x07, 0x62, 0x12, 0x32, 0xee, 0x9b, 0xf7, 0xa5, 0xac, 0xfb, 0x34, 0x56, 0x80, 0xb9, - 0x02, 0xc9, 0xc3, 0x71, 0xd0, 0x17, 0x93, 0x89, 0xe0, 0xc1, 0x05, 0xc8, 0x88, 0x15, 0x9f, 0xfa, - 0xa1, 0x6e, 0xe3, 0x5a, 0x33, 0x12, 0xbe, 0xcc, 0x20, 0x52, 0x89, 0x29, 0x90, 0x51, 0xca, 0x04, - 0x56, 0x8c, 0x90, 0xa3, 0x0c, 0x68, 0x59, 0x01, 0x7d, 0x21, 0xce, 0x7b, 0x42, 0x9c, 0x67, 0x54, - 0xdd, 0x8a,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5, 0xf0, 0x61, 0x3a, 0xa8, 0x54, 0x07, 0x93, - 0x43, 0x79, 0x30, 0x41, 0xcf, 0xa1, 0x5f, 0x93, 0x00, 0xe8, 0xcb, 0xe8, 0x52, 0x00, 0xae, 0x31, - 0x50, 0x50, 0xee, 0x36, 0x42, 0xbe, 0xc0, 0x3c, 0x87, 0xce, 0xc9, 0x6a, 0x7e, 0x4d, 0x9b, 0x15, - 0xb4, 0xdd, 0x56, 0x15, 0x69, 0xad, 0xac, 0x03, 0x71, 0x2c, 0x47, 0x18, 0xe5, 0x1c, 0x42, 0x29, - 0xe7, 0x94, 0x56, 0xd6, 0x31, 0x40, 0x2a, 0xe7, 0x10, 0x4a, 0x39, 0xa7, 0xb4, 0xb2, 0x6e, 0x3e, - 0x52, 0x39, 0x87, 0x50, 0xca, 0x39, 0xe5, 0x39, 0x54, 0x92, 0x3b, 0x5d, 0x50, 0xc7, 0x72, 0x14, - 0xd1, 0x2d, 0x54, 0x97, 0x63, 0xc4, 0x6d, 0xe0, 0x7a, 0x1c, 0x33, 0x9e, 0x43, 0x05, 0x59, 0xd1, - 0x17, 0xb4, 0x8e, 0x95, 0x74, 0xb7, 0xd0, 0x8a, 0x9e, 0x43, 0x7f, 0xd5, 0xc8, 0xe6, 0x29, 0x44, - 0xc9, 0xe5, 0xde, 0x60, 0xc2, 0xf8, 0x5b, 0x58, 0xd0, 0xe7, 0xf6, 0xda, 0x65, 0xd6, 0x7d, 0x81, - 0x70, 0x51, 0x86, 0x93, 0x9d, 0xbd, 0xd6, 0x05, 0x75, 0x90, 0xfd, 0x86, 0xa2, 0x52, 0x9e, 0x41, - 0xb8, 0x94, 0x67, 0x94, 0xe7, 0xd0, 0xdf, 0x35, 0xf2, 0xd0, 0x50, 0x4f, 0xe7, 0x7f, 0x84, 0xa9, - 0x47, 0x99, 0x45, 0xd5, 0xa3, 0x0c, 0x27, 0xf1, 0xbf, 0x67, 0x38, 0xa2, 0x0d, 0xbc, 0x13, 0xb7, - 0x59, 0xc1, 0x81, 0xe7, 0xd0, 0x3f, 0x35, 0xf2, 0xc8, 0x90, 0x7e, 0xc3, 0xc6, 0x70, 0x20, 0xb8, - 0x02, 0xae, 0xe8, 0x2e, 0xde, 0x85, 0x81, 0xbb, 0x2f, 0x2b, 0x18, 0x32, 0xf8, 0x64, 0x9b, 0xdc, - 0xed, 0x82, 0x3a, 0x8d, 0x8f, 0x4c, 0x34, 0x40, 0x84, 0x35, 0x06, 0xdc, 0x3a, 0x26, 0xa1, 0x31, - 0xe1, 0x39, 0x74, 0x9c, 0xcc, 0x82, 0xf8, 0x8a, 0xfa, 0x38, 0x3d, 0x37, 0x40, 0xca, 0x79, 0x0e, - 0x9d, 0x11, 0xa2, 0x87, 0x6f, 0x22, 0xd8, 0xc2, 0x0e, 0xfa, 0xaa, 0xb2, 0x82, 0x10, 0x3d, 0x79, - 0x6f, 0x71, 0x9d, 0x71, 0xc2, 0xf4, 0x31, 0x16, 0x33, 0x64, 0x53, 0x04, 0x35, 0x64, 0x53, 0x26, - 0x19, 0xec, 0xab, 0xb9, 0x2c, 0x66, 0xce, 0x6a, 0x02, 0x35, 0x67, 0x35, 0x92, 0xef, 0xe3, 0xc3, - 0x50, 0x85, 0xfb, 0xe1, 0x28, 0xc2, 0xec, 0xe3, 0x8c, 0x41, 0xed, 0xe3, 0x0c, 0xf2, 0x1c, 0xba, - 0x20, 0x1b, 0x85, 0xf2, 0x91, 0x82, 0x09, 0xa6, 0xd0, 0x29, 0x86, 0x2a, 0x74, 0xca, 0x78, 0x0e, - 0xfd, 0x51, 0x23, 0xeb, 0x3a, 0x92, 0xe9, 0x77, 0xb4, 0x83, 0xcd, 0x72, 0x66, 0x60, 0x07, 0x7d, - 0x70, 0x29, 0x6c, 0xcc, 0xc9, 0xba, 0xce, 0x75, 0xe6, 0xe2, 0x36, 0x0b, 0x70, 0xbf, 0x0b, 0xea, - 0xb5, 0xf1, 0xf6, 0x84, 0x39, 0x2e, 0x9b, 0x1c, 0xea, 0xb8, 0x6c, 0x82, 0xfa, 0xc8, 0xbe, 0xb1, - 0x6c, 0x83, 0x6e, 0x57, 0x72, 0xe1, 0xb6, 0xab, 0x99, 0xd0, 0xa5, 0x78, 0xa0, 0xbb, 0xf0, 0x5f, - 0x6d, 0xfc, 0xac, 0x91, 0xcd, 0x2e, 0xa8, 0xbd, 0xe1, 0x10, 0xfa, 0x0a, 0x06, 0xef, 0xe2, 0xb7, - 0x53, 0x4c, 0x2a, 0x97, 0x40, 0x54, 0x2a, 0x97, 0xc8, 0xa2, 0x29, 0x27, 0xc5, 0xcb, 0x2e, 0xa6, - 0x1a, 0x06, 0x86, 0xaa, 0x86, 0xc1, 0x79, 0x0e, 0xfd, 0x46, 0xd6, 0x97, 0x2c, 0x60, 0x7e, 0x6b, - 0x0a, 0x0a, 0xf5, 0x2a, 0x55, 0x60, 0x9e, 0xb3, 0xff, 0xea, 0xd3, 0xee, 0x88, 0xa9, 0xb3, 0x59, - 0x2f, 0x7e, 0xf5, 0x0e, 0xe2, 0x87, 0x04, 0xd9, 0x43, 0x02, 0x9b, 0xbf, 0x0e, 0x7b, 0x2b, 0xc9, - 0xff, 0x03, 0xcd, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x03, 0x1b, 0x15, 0x72, 0x69, 0x14, 0x00, - 0x00, + // 872 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x98, 0x4d, 0x6b, 0x13, 0x41, + 0x18, 0xc7, 0x37, 0x97, 0x6a, 0xc7, 0xb6, 0xd6, 0x11, 0x3c, 0xec, 0x49, 0xf6, 0xa4, 0x07, 0x77, + 0xd3, 0x24, 0x4d, 0x8a, 0x52, 0xa5, 0x2f, 0x1a, 0x8a, 0x60, 0x4b, 0x45, 0x0f, 0x5e, 0x64, 0x93, + 0x3c, 0x49, 0x87, 0x26, 0x33, 0x71, 0x76, 0x52, 0x12, 0x04, 0x41, 0x10, 0x3c, 0x09, 0x5e, 0xfd, + 0x4e, 0x7e, 0x28, 0xd9, 0x9d, 0x7d, 0x99, 0x6c, 0x4b, 0x3b, 0xcf, 0x1e, 0xea, 0x29, 0x4c, 0xd8, + 0xdf, 0xfe, 0xff, 0xcf, 0xcb, 0x3c, 0x99, 0x09, 0x69, 0x87, 0x53, 0x16, 0x30, 0xae, 0x40, 0x46, + 0x20, 0x2f, 0x58, 0x1f, 0x02, 0xc6, 0x87, 0x32, 0xfc, 0x3c, 0x95, 0x62, 0xbe, 0x08, 0xae, 0xf8, + 0xce, 0x9f, 0x4a, 0xa1, 0x04, 0x7d, 0xd2, 0x3f, 0x83, 0xa1, 0x1f, 0xce, 0x94, 0x98, 0x84, 0x0a, + 0xfc, 0x81, 0x98, 0x84, 0x8c, 0xfb, 0xe6, 0x73, 0x29, 0xeb, 0x3e, 0x8d, 0x15, 0x60, 0xae, 0x40, + 0xf2, 0x70, 0x1c, 0xf4, 0xc5, 0x64, 0x22, 0x78, 0x70, 0x01, 0x32, 0x62, 0xc5, 0xa7, 0x7e, 0xa9, + 0xdb, 0xb8, 0xd6, 0x8c, 0x84, 0x2f, 0x33, 0x88, 0x54, 0x62, 0x0a, 0x64, 0x94, 0x32, 0x81, 0x15, + 0x23, 0xe4, 0x28, 0x03, 0x5a, 0x56, 0x40, 0x5f, 0x88, 0xf3, 0x9e, 0x10, 0xe7, 0x19, 0x55, 0xb7, + 0xa2, 0xa4, 0x18, 0x43, 0x84, 0x0a, 0xa6, 0x3f, 0x66, 0xc0, 0x55, 0xc6, 0x34, 0xad, 0x98, 0x41, + 0xa8, 0xc2, 0x5e, 0x98, 0x07, 0xd4, 0xb1, 0x82, 0x80, 0x5f, 0x30, 0x29, 0xf8, 0xc4, 0x50, 0xb3, + 0x8b, 0x89, 0x8b, 0x41, 0x1e, 0x53, 0xdb, 0x8a, 0x98, 0x8a, 0x31, 0xeb, 0x2f, 0x86, 0xac, 0xc8, + 0xc5, 0x4d, 0x71, 0x45, 0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bb, 0xf8, 0x52, 0x8c, 0xe9, 0xca, 0x25, 0x10, 0xd5, 0x95, 0x4b, + 0x64, 0x51, 0x94, 0x93, 0xe2, 0x8e, 0x8d, 0xc9, 0x86, 0x81, 0xa1, 0xb2, 0x61, 0x70, 0x9e, 0x43, + 0xbf, 0x91, 0xf5, 0x25, 0x0b, 0x98, 0xd1, 0x5f, 0x50, 0xa8, 0x1b, 0x5c, 0x81, 0x79, 0xce, 0xfe, + 0xab, 0x4f, 0xbb, 0x23, 0xa6, 0xce, 0x66, 0xbd, 0xf8, 0xc6, 0x1f, 0xc4, 0x2f, 0x09, 0xb2, 0x97, + 0x04, 0x36, 0xff, 0x58, 0xf6, 0x56, 0x92, 0xbf, 0x25, 0x9a, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, + 0xc9, 0x50, 0xc0, 0x5a, 0xe0, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -122,6 +122,7 @@ type InfraProxyClient interface { GetRole(ctx context.Context, in *request.Role, opts ...grpc.CallOption) (*response.Role, error) CreateRole(ctx context.Context, in *request.CreateRole, opts ...grpc.CallOption) (*response.Role, error) DeleteRole(ctx context.Context, in *request.Role, opts ...grpc.CallOption) (*response.Role, error) + UpdateRole(ctx context.Context, in *request.UpdateRole, opts ...grpc.CallOption) (*response.Role, error) GetClients(ctx context.Context, in *request.Clients, opts ...grpc.CallOption) (*response.Clients, error) GetClient(ctx context.Context, in *request.Client, opts ...grpc.CallOption) (*response.Client, error) GetDataBags(ctx context.Context, in *request.DataBags, opts ...grpc.CallOption) (*response.DataBags, error) @@ -324,6 +325,15 @@ func (c *infraProxyClient) DeleteRole(ctx context.Context, in *request.Role, opt return out, nil } +func (c *infraProxyClient) UpdateRole(ctx context.Context, in *request.UpdateRole, opts ...grpc.CallOption) (*response.Role, error) { + out := new(response.Role) + err := c.cc.Invoke(ctx, "/chef.automate.domain.infra_proxy.service.InfraProxy/UpdateRole", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *infraProxyClient) GetClients(ctx context.Context, in *request.Clients, opts ...grpc.CallOption) (*response.Clients, error) { out := new(response.Clients) err := c.cc.Invoke(ctx, "/chef.automate.domain.infra_proxy.service.InfraProxy/GetClients", in, out, opts...) @@ -454,6 +464,7 @@ type InfraProxyServer interface { GetRole(context.Context, *request.Role) (*response.Role, error) CreateRole(context.Context, *request.CreateRole) (*response.Role, error) DeleteRole(context.Context, *request.Role) (*response.Role, error) + UpdateRole(context.Context, *request.UpdateRole) (*response.Role, error) GetClients(context.Context, *request.Clients) (*response.Clients, error) GetClient(context.Context, *request.Client) (*response.Client, error) GetDataBags(context.Context, *request.DataBags) (*response.DataBags, error) @@ -532,6 +543,9 @@ func (*UnimplementedInfraProxyServer) CreateRole(ctx context.Context, req *reque func (*UnimplementedInfraProxyServer) DeleteRole(ctx context.Context, req *request.Role) (*response.Role, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented") } +func (*UnimplementedInfraProxyServer) UpdateRole(ctx context.Context, req *request.UpdateRole) (*response.Role, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented") +} func (*UnimplementedInfraProxyServer) GetClients(ctx context.Context, req *request.Clients) (*response.Clients, error) { return nil, status.Errorf(codes.Unimplemented, "method GetClients not implemented") } @@ -933,6 +947,24 @@ func _InfraProxy_DeleteRole_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _InfraProxy_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(request.UpdateRole) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraProxyServer).UpdateRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/chef.automate.domain.infra_proxy.service.InfraProxy/UpdateRole", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraProxyServer).UpdateRole(ctx, req.(*request.UpdateRole)) + } + return interceptor(ctx, in, info, handler) +} + func _InfraProxy_GetClients_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.Clients) if err := dec(in); err != nil { @@ -1233,6 +1265,10 @@ var _InfraProxy_serviceDesc = grpc.ServiceDesc{ MethodName: "DeleteRole", Handler: _InfraProxy_DeleteRole_Handler, }, + { + MethodName: "UpdateRole", + Handler: _InfraProxy_UpdateRole_Handler, + }, { MethodName: "GetClients", Handler: _InfraProxy_GetClients_Handler, diff --git a/api/interservice/infra_proxy/service/infra_proxy.proto b/api/interservice/infra_proxy/service/infra_proxy.proto index 3331ec7330c5..e4c392417259 100644 --- a/api/interservice/infra_proxy/service/infra_proxy.proto +++ b/api/interservice/infra_proxy/service/infra_proxy.proto @@ -49,6 +49,7 @@ service InfraProxy { rpc GetRole (chef.automate.domain.infra_proxy.request.Role) returns (chef.automate.domain.infra_proxy.response.Role) {}; rpc CreateRole (chef.automate.domain.infra_proxy.request.CreateRole) returns (chef.automate.domain.infra_proxy.response.Role) {}; rpc DeleteRole (chef.automate.domain.infra_proxy.request.Role) returns (chef.automate.domain.infra_proxy.response.Role) {}; + rpc UpdateRole (chef.automate.domain.infra_proxy.request.UpdateRole) returns (chef.automate.domain.infra_proxy.response.Role) {}; rpc GetClients (chef.automate.domain.infra_proxy.request.Clients) returns (chef.automate.domain.infra_proxy.response.Clients) {}; rpc GetClient (chef.automate.domain.infra_proxy.request.Client) returns (chef.automate.domain.infra_proxy.response.Client) {}; diff --git a/components/automate-chef-io/data/docs/api_chef_automate/infra_proxy/infra_proxy.swagger.json b/components/automate-chef-io/data/docs/api_chef_automate/infra_proxy/infra_proxy.swagger.json index 4546900ad7c3..ac1d781d6535 100644 --- a/components/automate-chef-io/data/docs/api_chef_automate/infra_proxy/infra_proxy.swagger.json +++ b/components/automate-chef-io/data/docs/api_chef_automate/infra_proxy/infra_proxy.swagger.json @@ -1119,6 +1119,51 @@ "tags": [ "InfraProxy" ] + }, + "put": { + "operationId": "UpdateRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/chef.automate.api.infra_proxy.response.Role" + } + } + }, + "parameters": [ + { + "name": "server_id", + "description": "Chef Infra Server ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "org_id", + "description": "Chef organization ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "name", + "description": "Role name.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/chef.automate.api.infra_proxy.request.UpdateRole" + } + } + ], + "tags": [ + "InfraProxy" + ] } }, "/api/v0/infra/version": { @@ -1330,6 +1375,49 @@ } } }, + "chef.automate.api.infra_proxy.request.UpdateRole": { + "type": "object", + "properties": { + "org_id": { + "type": "string", + "description": "Chef organization ID." + }, + "server_id": { + "type": "string", + "description": "Chef Infra Server ID." + }, + "name": { + "type": "string", + "description": "Role name." + }, + "description": { + "type": "string", + "description": "Role description." + }, + "default_attributes": { + "type": "string", + "description": "Role default attributes." + }, + "override_attributes": { + "type": "string", + "description": "Role override attributes." + }, + "run_list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Role run list." + }, + "env_run_lists": { + "type": "array", + "items": { + "$ref": "#/definitions/chef.automate.api.infra_proxy.request.EnvRunList" + }, + "description": "Environment based run list." + } + } + }, "chef.automate.api.infra_proxy.request.UpdateServer": { "type": "object", "properties": { diff --git a/components/automate-gateway/api/infra_proxy.pb.swagger.go b/components/automate-gateway/api/infra_proxy.pb.swagger.go index 7233ee9f079d..f7c3722b2d68 100644 --- a/components/automate-gateway/api/infra_proxy.pb.swagger.go +++ b/components/automate-gateway/api/infra_proxy.pb.swagger.go @@ -1122,6 +1122,51 @@ func init() { "tags": [ "InfraProxy" ] + }, + "put": { + "operationId": "UpdateRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/chef.automate.api.infra_proxy.response.Role" + } + } + }, + "parameters": [ + { + "name": "server_id", + "description": "Chef Infra Server ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "org_id", + "description": "Chef organization ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "name", + "description": "Role name.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/chef.automate.api.infra_proxy.request.UpdateRole" + } + } + ], + "tags": [ + "InfraProxy" + ] } }, "/api/v0/infra/version": { @@ -1333,6 +1378,49 @@ func init() { } } }, + "chef.automate.api.infra_proxy.request.UpdateRole": { + "type": "object", + "properties": { + "org_id": { + "type": "string", + "description": "Chef organization ID." + }, + "server_id": { + "type": "string", + "description": "Chef Infra Server ID." + }, + "name": { + "type": "string", + "description": "Role name." + }, + "description": { + "type": "string", + "description": "Role description." + }, + "default_attributes": { + "type": "string", + "description": "Role default attributes." + }, + "override_attributes": { + "type": "string", + "description": "Role override attributes." + }, + "run_list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Role run list." + }, + "env_run_lists": { + "type": "array", + "items": { + "$ref": "#/definitions/chef.automate.api.infra_proxy.request.EnvRunList" + }, + "description": "Environment based run list." + } + } + }, "chef.automate.api.infra_proxy.request.UpdateServer": { "type": "object", "properties": { diff --git a/components/automate-gateway/handler/infra_proxy/roles.go b/components/automate-gateway/handler/infra_proxy/roles.go index e37132318537..669a2903e7da 100644 --- a/components/automate-gateway/handler/infra_proxy/roles.go +++ b/components/automate-gateway/handler/infra_proxy/roles.go @@ -87,6 +87,27 @@ func (a *InfraProxyServer) DeleteRole(ctx context.Context, r *gwreq.Role) (*gwre }, nil } +// UpdateRole updates an infra role +func (a *InfraProxyServer) UpdateRole(ctx context.Context, r *gwreq.UpdateRole) (*gwres.Role, error) { + req := &infra_req.UpdateRole{ + OrgId: r.OrgId, + ServerId: r.ServerId, + Name: r.Name, + Description: r.Description, + DefaultAttributes: r.DefaultAttributes, + OverrideAttributes: r.OverrideAttributes, + RunList: r.RunList, + } + res, err := a.client.UpdateRole(ctx, req) + if err != nil { + return nil, err + } + + return &gwres.Role{ + Name: res.GetName(), + }, nil +} + func fromUpstreamRoles(roles []*infra_res.RoleListItem) []*gwres.RoleListItem { ts := make([]*gwres.RoleListItem, len(roles)) diff --git a/components/infra-proxy-service/server/roles.go b/components/infra-proxy-service/server/roles.go index 21276b913f14..3a6acb359f6b 100644 --- a/components/infra-proxy-service/server/roles.go +++ b/components/infra-proxy-service/server/roles.go @@ -203,6 +203,66 @@ func (s *Server) DeleteRole(ctx context.Context, req *request.Role) (*response.R } +// UpdateRole updates the role +func (s *Server) UpdateRole(ctx context.Context, req *request.UpdateRole) (*response.Role, error) { + c, err := s.createClient(ctx, req.OrgId, req.ServerId) + if err != nil { + return nil, err + } + + if req.Name == "" { + return nil, status.Error(codes.InvalidArgument, "must supply role name") + } + + runList := req.RunList + if len(runList) == 0 { + runList = []string{} + } + + var defAtt interface{} + var ovrAtt interface{} + + defIn := req.DefaultAttributes + if defIn == "" { + defIn = "{}" + } + + overIn := req.OverrideAttributes + if overIn == "" { + overIn = "{}" + } + defaultAttributes := json.RawMessage(defIn) + overrideAttributes := json.RawMessage(overIn) + + err = json.Unmarshal(defaultAttributes, &defAtt) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + err = json.Unmarshal(overrideAttributes, &ovrAtt) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + _, err = c.client.Roles.Put( + &chef.Role{ + Name: req.Name, + Description: req.Description, + RunList: runList, + DefaultAttributes: defAtt, + OverrideAttributes: ovrAtt, + EnvRunList: chef.EnvRunList{}, + }) + + if err != nil { + return nil, ParseAPIError(err) + } + + return &response.Role{ + Name: req.Name, + }, nil +} + // fromAPIToListRoles a response.Roles from a struct of RoleList func fromAPIToListRoles(result RoleListResult) []*response.RoleListItem { cl := make([]*response.RoleListItem, result.Total)