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

Enhance handling of local SSH Key files #548

Closed
powerkimhub opened this issue Dec 7, 2021 · 7 comments
Closed

Enhance handling of local SSH Key files #548

powerkimhub opened this issue Dec 7, 2021 · 7 comments
Assignees
Labels
CloudDriver enhancement New feature or request

Comments

@powerkimhub
Copy link
Member

powerkimhub commented Dec 7, 2021

@dev4unet @inno-cloudbarista (@innodreamer )

[현황]

  • Spider 내부에서 SSH Key 관리 방법은 현재 2가지 타입이 존재합니다.
    (1) CSP 기능 활용 타입
    (2) DRV 기능 제공 타입(local file로 관리)
    (3) CSP+DRV 혼용: 현재는 사용되지 않는 타입

  • 현재 (2)번 타입의 local file 관리 방식은 다음과 같은 잠재적 이슈가 존재합니다.

    • 입력되는 Key Name 형식에 따른 오류 발생 가능성 존재
    • file 형태 노출로 손실(훼손) 및 보안 문제 가능성 등

[제안]

  • 위와 같은 사유로 다음과 같은 방법으로 개선하고자 합니다.

  • 적용 대상 Driver

    • CloudIT Driver
    • GCP Driver
    • NCP Driver (Added, 2021.12.24)
  • 추진 가이드

    • 현재는 기본 기능만 시험해본 상태입니다.
      • VM 생성에 적용 및 VM 로그인 시험 등이 필요합니다.
    • 효율적인 적용을 위해서 GCP 먼저 적용 완료 후 검증이 완료 되면,
      • CloudIt을 추진하시는 것이 좋을 듯합니다.
    • 적용에 문제가 있으시면 현재 이슈에 답글로 공유해주시기 바랍니다.
@powerkimhub powerkimhub added enhancement New feature or request CloudDriver labels Dec 7, 2021
@powerkimhub powerkimhub assigned dev4unet and unassigned dev4unet Dec 7, 2021
@powerkimhub powerkimhub pinned this issue Dec 7, 2021
@powerkimhub
Copy link
Member Author

[부연 설명]

  • Spider Server가 내려 보내는 KeyPair NameId는 Unique 하다고 생각하시고 처리하시면 되겠습니다.
  • List Key의 경우 다음 API가 제공하는 모든 목록을 KeyPairInfo로 변환해서 그대로 올려 주시면 되겠습니다.

@dev4unet
Copy link
Member

@powerkimhub GCP의 경우 기존에는 VM 생성 시 Public Key를 사용하기에 KeyPair 생성 및 조회 시에도 KeyPairInfo에있는 PublicKey 필드의 정보를 함께 리턴하고 있었습니다.

공통함수의 경우 PublicKey를 취급하지 않기에 KeyPair 생성시 함께 생성된 PublicKey를 사용하지 않는 형태로 수정할 경우...
키페어 조회나 목록에서는 KeyPairInfo의 PublicKey 정보를 공백("")으로 리턴하고 VM 생성 시에만 MakePublicKeyFromPrivateKey()를 이용해서 처리하도록 할까요?

아니면 KeyPair조회나 목록 요청시에도 매번 모든 KeyPair에 대해 MakePublicKeyFromPrivateKey()를 호출해서 PublicKey를 생성 해서 KeyPairInfo의 PublicKey 필드 값을 내려 보내야 할까요?

만약, KeyPair 정보 조회나 KeyPair 목록의 결과 값에 PublicKey가 포함될 필요가 없으면 기존의 PublicKey를 처리하는 부분을 삭제하고 VM 생성 시에는 MakePublicKeyFromPrivateKey()를 이용하도록 수정할 생각입니다.

그렇지 않고 조회나 목록에서도 PublicKey가 필요하다면 성능상 공통함수에 PublicKey가 포함되는게 좋을 듯싶습니다.

@powerkimhub
Copy link
Member Author

@dev4unet

  • 의견 주신 것처럼,
  • KeyPair 생성시에만 제공해 주시면 되겠습니다.
  • Get/List KeyPairInfo 제공 시에는 안올려 주셔도 되겠습니다.

powerkimhub added a commit that referenced this issue Dec 10, 2021
[GCP] 키페어 로직을 공통 모듈로 대체 / VM 생성 시 공개키 로직 변경 - 이슈 #548
@powerkimhub
Copy link
Member Author

@powerkimhub
Copy link
Member Author

@innodreamer

  • NCP 적용 필요

@innodreamer
Copy link
Member

innodreamer commented Feb 18, 2022

@powerkimhub NCP에서 keypair 생성시 public key string이 cb-store에 저장되고, keypair 삭제시에는 그 public key string이 삭제되도록 보완되었습니다.
https://github.com/cloud-barista/ncp/pull/57

inno-cloudbarista pushed a commit to inno-cloudbarista/cb-spider that referenced this issue Feb 22, 2022
- Enhance handling of local SSH Key files 이슈 적용 cloud-barista#548
- KeyPair 리턴 형식 변경 
  - Return info of the KeyPair Create/List/Get API are not clear cloud-barista#560
@powerkimhub
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CloudDriver enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants