[iqe-notifications-plugin]$ token=$(curl https://sso.stage.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token -d grant_type=password -d client_id=rhsm-api -d username= -d password= | jq --raw-output .access_token) bash: command substitution: line 14: syntax error near unexpected token `|' bash: command substitution: line 14: `curl https://sso.stage.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token -d grant_type=password -d client_id=rhsm-api -d username= -d password= | jq --raw-output .access_token)' [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ token=$(curl https://sso.stage.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token -d grant_type=password -d client_id=rhsm-api -d username=notifications-user -d password=redhatqa! | jq --raw-output .access_token) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2623 100 2538 100 85 4484 150 --:--:-- --:--:-- --:--:-- 4634 [iqe-notifications-plugin]$ echo $token eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJkMXJ6aTRXZFIwdUgycWVGVkpfYVJmazFjb0plUmI5amw5NTF4a3NaOXlZIn0.eyJleHAiOjE2NDk3NzA5MzIsImlhdCI6MTY0OTc3MDAzMiwianRpIjoiMGI4NDlkNzItNTBlNS00MjZmLWE2MWEtMTc4MjAzYzcyMmFhIiwiaXNzIjoiaHR0cHM6Ly9zc28uc3RhZ2UucmVkaGF0LmNvbS9hdXRoL3JlYWxtcy9yZWRoYXQtZXh0ZXJuYWwiLCJhdWQiOiJyaHNtLWFwaSIsInN1YiI6ImY6YWM0YmNkYjUtMWZiMS00MWM1LTkzMjMtMzQ5Njk4YjliNzU3Om5vdGlmaWNhdGlvbnMtdXNlciIsInR5cCI6IkJlYXJlciIsImF6cCI6InJoc20tYXBpIiwic2Vzc2lvbl9zdGF0ZSI6ImMzZDhhZjQ4LTc1MTYtNDlmNC05NTkzLTRkMzE2Njk5NGI4YyIsImFjciI6IjEiLCJzY29wZSI6I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7HFjZf-B5siqc [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ [iqe-notifications-plugin]$ curl https://console.stage.redhat.com/api/notifications/v1.0/notifications/behaviorGroups --proxy http://squid.corp.redhat.com:3128 -XPOST -H 'Content-Type: application/json' -d '{"behavior_group": {"bundle_id": "35fd787b-a345-4fe8-a135-7773de15905e", "display_name": "Test Behavior Groups 1723095", }}' -H "Authorization: Bearer ${token}" -vvv Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 10.68.5.41:3128... * Connected to squid.corp.redhat.com (10.68.5.41) port 3128 (#0) * allocate connect buffer! * Establish HTTP proxy tunnel to console.stage.redhat.com:443 > CONNECT console.stage.redhat.com:443 HTTP/1.1 > Host: console.stage.redhat.com:443 > User-Agent: curl/7.71.1 > Proxy-Connection: Keep-Alive > < HTTP/1.0 200 Connection established < * Proxy replied 200 to CONNECT request * CONNECT phase completed! * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * TLSv1.3 (OUT), TLS handshake, Client hello (1): * CONNECT phase completed! * CONNECT phase completed! * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): * TLSv1.3 (IN), TLS handshake, Certificate (11): * TLSv1.3 (IN), TLS handshake, CERT verify (15): * TLSv1.3 (IN), TLS handshake, Finished (20): * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.3 (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 * ALPN, server accepted to use h2 * Server certificate: * subject: C=US; ST=North Carolina; L=Raleigh; O=Red Hat, Inc.; CN=*.stage.redhat.com * start date: Dec 1 00:00:00 2021 GMT * expire date: Dec 1 23:59:59 2022 GMT * subjectAltName: host "console.stage.redhat.com" matched cert's "*.stage.redhat.com" * issuer: C=US; O=DigiCert Inc; CN=DigiCert SHA2 Secure Server CA * SSL certificate verify ok. * Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 * Using Stream ID: 1 (easy handle 0x557cfd2cd430) > POST /api/notifications/v1.0/notifications/behaviorGroups HTTP/2 > Host: console.stage.redhat.com > user-agent: curl/7.71.1 > accept: */* > content-type: application/json > authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJkMXJ6aTRXZFIwdUgycWVGVkpfYVJmazFjb0plUmI5amw5NTF4a3NaOXlZIn0.eyJleHAiOjE2NDk3NzA5MzIsImlhdCI6MTY0OTc3MDAzMiwianRpIjoiMGI4NDlkNzItNTBlNS00MjZmLWE2MWEtMTc4MjAzYzcyMmFhIiwiaXNzIjoiaHR0cHM6Ly9zc28uc3RhZ2UucmVkaGF0LmNvbS9hdXRoL3JlYWxtcy9yZWRoYXQtZXh0ZXJuYWwiLCJhdWQiOiJyaHNtLWFwaSIsInN1YiI6ImY6YWM0YmNkYjUtMWZiMS00MWM1LTkzMjMtMzQ5Njk4YjliNzU3Om5vdGlmaWNhdGlvbnMtdXNlciIsInR5cCI6IkJlYXJlciIsImF6cCI6InJoc20tYXBpIiwic2Vzc2lvbl9zdGF0ZSI6ImMzZDhhZjQ4LTc1MTYtNDlmNC05NTkzLTRkMzE2Njk5NGI4YyIsImFjciI6IjEiLCJzY29wZSI6IiIsInNpZCI6ImMzZDhhZjQ4LTc1MTYtNDlmNC05NTkzLTRkMzE2Njk5NGI4YyIsImFjY291bnRfbnVtYmVyIjoiNjA4OTcxOSIsImFjY291bnRfaWQiOiIxMTc4OTc3MiIsInVzZXJfaWQiOiI1MzI1ODkzNCIsIm5hbWUiOiJub3RpZmljYXRpb25zLXVzZXIgcWEiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJub3RpZmljYXRpb25zLXVzZXIiLCJnaXZlbl9uYW1lIjoibm90aWZpY2F0aW9ucy11c2VyIiwibG9jYWxlIjoiZW5fVVMiLCJmYW1pbHlfbmFtZSI6InFhIiwiZW1haWwiOiJ5bGFoYXYrNytzdGFnZUByZWRoYXQuY29tIn0.NbP5QB0E0gTTeRr0dXL2J7RwRgtNY6q48JjJb9bOI04QuNJBX0NELmuWVVsdWBLrsZHoFSx_4wi6VBLhD44YY4pqgMnLQhEgzE-zzqhRarDv01Z2hcTFuCpPj2pBy4afDsvpz0hizIcAqtxgyTin4SW5YFTkPH-KKfYk73y9kRYmX9QzfK0Hcf-sBVJA9iIdrkUgHstBwSv4K_tmV3d-Ii8jNN9rVULMsjyhxIKEb6aFe8WjiCvNpXdYYNqXR4UIw6ObVK9XIiPkLapw4gY4LE9fO64Wrd-E3BN5Iil6G40S7Rg_4BsZLe-V8UDDswG46EB3teCVPD8Ceu3vKRn0IN-g88eU6MGKZ7iDuzLvSzXlppMfGgxJ76-V5m6i-ycjL5NkqjltjwQmUAcXglSz7ZqU62pNPU3rmwZl-KF-tVFaSJa5S_g3xGnF2yCRT8dwl6O55UvbKKpPda6RHUEP2tdcrSMN4QeXAumgWTQ0OQSSlpF4gakcRwi6aRsn30GzxlssayxgvV5kOSjSa0sdOhyp5ZwGXhyVFTit7IPl1inI9Kgi9GUlAPDpmv07VKYEqqbQWUBU_LxqWKm8Rze0I2ZG_gQVIxGaia_N2HnE5LsSgY-NmcwyOhmpRpR4XQWRA1uAtkjFc-DcoVVCqpfBWkrwprKQUv7HFjZf-B5siqc > content-length: 123 > * We are completely uploaded and fine * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * old SSL session ID is stale, removing * Connection state changed (MAX_CONCURRENT_STREAMS == 100)! < HTTP/2 500 < server: openresty < content-type: text/html < content-length: 174 < x-rh-insights-request-id: 5bd79f4a38c74c39a810465da54f3157 < x-content-type-options: nosniff < date: Tue, 12 Apr 2022 13:28:34 GMT < set-cookie: 8f585a7d113e400d14faa100d81cbdaf=c62fee7b46f895190df4b65b5d1950b3; path=/; HttpOnly; Secure; SameSite=None < x-rh-edge-request-id: 13e6d8b2 < x-rh-edge-reference-id: 0.6c465868.1649770114.13e6d8b2 < x-rh-edge-cache-status: Miss from child, Miss from parent < x-frame-options: SAMEORIGIN < 500 Internal Server Error

500 Internal Server Error


openresty
* Connection #0 to host squid.corp.redhat.com left intact [iqe-notifications-plugin]$