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

restコマンドでの'https://secure.sakura.ad.jp'以外に対するリクエストの防止機能 #872

Open
yamamoto-febc opened this issue Nov 10, 2021 · 0 comments

Comments

@yamamoto-febc
Copy link
Member

yamamoto-febc commented Nov 10, 2021

restコマンドでは任意のホストに対しリクエストを行える。

例: usacloud rest https://my-api-host.example.com/zone/is1a/server

この際にホスト名を誤って入力してしまった場合でもAuthorizationヘッダーを送信することを防ぎたい。

仕様案

  • リクエスト先が https://secure.sakura.ad.jp の場合はOK -> 注: プロファイルなどによるAPIRootの設定を尊重する
  • 以外の場合は警告を表示し、リクエスト送信せずにコマンド終了
  • ただし何らかのオプション(--ignore-warningみたいな)を付けておけば強制的にリクエストを送信可能
    -> テスト時にlocalhostなどを利用するケースがあるため明示すれば制限を回避できるようにしたい
@yamamoto-febc yamamoto-febc changed the title restコマンドでの未知のホストに対するリクエストの防止機能 restコマンドでの'https://secure.sakura.ad.jp'以外に対するリクエストの防止機能 Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant