웹사이트에 어떤 권한이 필요합니까?
내용물
소개
Continuing on from my previous blog about website security week , 우리는 웹사이트의 기능 및 권한에 대해 이야기할 것입니다.이는 사이트가 제공될 때 사이트의 헤더로 설정됩니다.
기능 정책
The feature policy was introduced several years ago and allows you to limit the web features that your website and anything embedded including iframes can use.
This helps protect your users from anything running that shouldn't be and accessing any web features that you didn't intend.
Here are some of the most important features to enable/disable:
- accelerometer
- camera
- geolocation
- gyroscope
- magnetometer
- microphone
- payment
- usb
사용 예:
feature-policy: accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment 'none'; usb 'none'
허용되는 값은 다음과 같습니다.
*
- 모든 최상위 사이트 및 포함된 콘텐츠에서 기능을 허용합니다self
- 모든 최상위 사이트 및 포함된 콘텐츠에서 기능을 허용하지만 중첩 컨텍스트에서 원본 문서를 교차할 수 없음<origin>
- 특정 원점에 대한 기능을 허용합니다. 이 경우 <origin>
를 사용하려는 원점none
- 기능을 비활성화합니다권한 정책
The features policy has been superseded by the better named Permissions Policy. I would still recommend setting both to support older browsers.
It supports the same features as the Features Policy but with a slightly different syntax.
In features policy it would look like:
feature-policy: accelerometer 'none'; camera 'self'; geolocation 'self' https://google.com
which translates to:
permissions-policy: accelerometer=(), camera=(self), geolocation=(self "https://google.com")
Really simple to convert from the old policy and a slightly nicer syntax too!
요약
In summary, it's really easy to set two additional headers to help improve the security of your site. Denying permission to unused features limits the risk to your users and the possibilities if there is a breach of any untoward web features being used.
Set those headers now!
Happy Building!
Reference
이 문제에 관하여(웹사이트에 어떤 권한이 필요합니까?), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/jordanfinners/what-permissions-does-your-website-need-243f텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)