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

New feature jump host using public ip only #1353

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

seokho-son
Copy link
Member

Add New feature jump host using public ip only

  • /ns/{nsId}/cmd/mcis/{mcisId} will use a given bastion host for remote command (ssh command)

POST
/ns/{nsId}/cmd/mcis/{mcisId}

Test: MCIS Command Request

{
"command": "client_ip=$(echo $SSH_CLIENT | awk '{print $1}'); echo SSH client IP is: $client_ip",
"userName": "cb-user"
}

Result

{
  "resultArray": [
    {
      "mcisId": "mcis01",
      "vmId": "g1-2",
      "vmIp": "52.78.237.85",
      "result": "SSH client IP is: 52.78.237.85\n"
    },
    {
      "mcisId": "mcis01",
      "vmId": "g1-1",
      "vmIp": "3.36.133.28",
      "result": "SSH client IP is: 52.78.237.85\n"
    },
    {
      "mcisId": "mcis01",
      "vmId": "g1-3",
      "vmIp": "13.125.71.72",
      "result": "SSH client IP is: 52.78.237.85\n"
    },
    {
      "mcisId": "mcis01",
      "vmId": "g1-4",
      "vmIp": "3.38.100.162",
      "result": "SSH client IP is: 52.78.237.85\n"
    },
    {
      "mcisId": "mcis01",
      "vmId": "g1-5",
      "vmIp": "52.78.157.4",
      "result": "SSH client IP is: 52.78.237.85\n"
    }
  ]
}

Note

  • disabled verifying username for now.
  • this feature is not complete. Need to use private IPs only.

@seokho-son
Copy link
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Sep 25, 2023
@seokho-son seokho-son merged commit e15b655 into cloud-barista:main Sep 25, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved and will be merged soon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant