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

機密性の高いフィールドはAPIから返さない #11

Merged
merged 2 commits into from
Jul 7, 2020

Conversation

kiy0taka
Copy link
Contributor

@kiy0taka kiy0taka commented Jul 7, 2020

以下のDBカラムを返さないように修正

@kiy0taka kiy0taka force-pushed the dev/hide_sensitive_fields branch from 9607c57 to 40e2aac Compare July 7, 2020 01:23
@okazy okazy added this to the 1.0 milestone Jul 7, 2020
@okazy okazy added the enhancement New feature or request label Jul 7, 2020
Copy link
Contributor

@okazy okazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントしました。

GraphQL/Types.php Outdated Show resolved Hide resolved
@okazy
Copy link
Contributor

okazy commented Jul 7, 2020

上げていけばキリがないのですが、、、
Customer::classreset_keyBaseInfo::classauthentication_key も制限しておいた方がいいのではないでしょうか。
reset_key があれば勝手にパスワード変更可能かと思います。

@kiy0taka kiy0taka force-pushed the dev/hide_sensitive_fields branch from 40e2aac to af00102 Compare July 7, 2020 07:14
Copy link
Contributor

@okazy okazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

機密性の高いfieldが取得できなくなっていることを確認しました。

request

query getOrders {
  customers {
    id
    name01
    password
  }
  orders {
    id
    Customer{
      id
      name01
      password
    }
}

response

{
  "errors": [
    {
      "message": "Cannot query field \"password\" on type \"Customer\".",
      "extensions": {
        "category": "graphql"
      },
      "locations": [
        {
          "line": 11,
          "column": 5
        }
      ]
    },
    {
      "message": "Cannot query field \"password\" on type \"Customer\".",
      "extensions": {
        "category": "graphql"
      },
      "locations": [
        {
          "line": 23,
          "column": 7
        }
      ]
    }
  ]
}

@okazy okazy merged commit fdde33d into master Jul 7, 2020
@okazy okazy deleted the dev/hide_sensitive_fields branch July 22, 2020 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants