본문 바로가기

Public Cloud

(10)
[Cloudflare-CDN] HTTP Header를 무시하고 모든 콘텐츠 caching 하기 Caching Level 설정 Cloudflare 의 cache 정책은 기본적으로 파일 확장자를 기반으로 caching 을 수행한다. Cloudflare Edge Server 에서 caching 정책은 WEB GUI Dashboard 에서 간단히 설정할 수 있다. 경로 : Caching - Configuration - Caching Level No query string : querystring 이 없는 request 만 caching 한다. 동적콘텐츠는 caching 하지 않는다. - 예) GET /a.jpg - GET/a.jpg?t=asd123 과 같은 querystring 이 있는 request는 caching 하지 않는다. Ignore query string : querystring 을 무시하고 ..
[Cloudflare] CDN Cache 응답(Response Status)에 따른 HTTP 통신 파악하기 Cloudflare 에서 제공하는 Cache Respose Status 는 아래 참조 문서에서 확인할 수 있다. 참조 : https://developers.cloudflare.com/cache/concepts/default-cache-behavior/ Default Cache Behavior · Cloudflare Cache (CDN) docs Cloudflare respects the origin web server’s cache headers in the following order unless an Edge Cache TTL page rule overrides the headers. developers.cloudflare.com cloudflare Cache Respose Status HIT The..
[Cloudflare] ColoCode를 Logstash에서 좌표값 Field 추가 하기 Logstash Filter에 translate 값 사용 logstash config filter { translate { regex => true dictionary_path => "/opt/cf-edge-location/cloudflare-edge-locations.json" field => "ColoCode" } } cloudflare-edge-locations.json 참조 : https://www.npmjs.com/package/cloudflare-edge-locations#json-lookup 실제 Edge ColoCode와 다른점이 있어 https://www.cloudflarestatus.com/ 를 보며 수정했음. json, csv 모두 사용가능 더보기 { "IAD": { "city": "..
[Azure] azure-cli(az) 사용하기 설치 (CentOS7) 1. repogitory key 가져오기 rpm --import https://packages.microsoft.com/keys/microsoft.asc 2. repogitory 작성 echo -e "[azure-cli] name=Azure CLI baseurl=https://packages.microsoft.com/yumrepos/azure-cli enabled=1 gpgcheck=1 gpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/azure-cli.repo 3. azure-cli 설치 yum install azure-cli account-name, account-key Az..
[Cloudflare] Spectrum Logpush 설정하기(azure) Cloudflare - Analytics - Logs - Add Logpush job Spectrum events 선택 log에 포함 하고 싶은 field 값 선택 destination 에 Azure 선택 SAS URL(공유 액세스 토큰) 입력 Azure - 스토리지 계정 - 컨테이너 - 공유액세스 토큰 발급할 토큰의 유효시간은 5년 이상으로 한다. 권한은 읽기를 제외한다. 이후 Azure 컨테이너에 ownership-challenge-***.txt 파일이 생성 되며 파일 내용의 코드를 복사하여 마무리한다.
[Azure] AD 새 사용자에게 특정 스토리지 권한만 할당하기 Azure Active Directory를 이용하여 새 사용자를 생성하고 Blob 컨테이너 관리를 위하여 특정 스토리지계정에 대한 권한 만을 할당하려고 한다. 사용자 생성 Azure Active Directory - 사용자 - 새 사용자 - 새 사용자 만들기 test라는 이름의 계정을 만든다. 이때 역할은 지정하지 않고 추후 스토리지 계정에서 할당 할 것이다. 스토리지 계정에 권한 할당 권한을 줄 스토리지 계정으로 이동 - 액세스 제어(IAM) - 추가 - 역할 할당 추가 Azure의 RBAC( Role Base Access Control) 은 크게 3가지로 소유자, 기여자, 독자로 나뉜다. 소유자 : 역할 할당을 포함한 리소스의 관리 권한 기여자 : 역할 할당을 제외한 리소스의 관리 권한 독자 : 모든..
[Azure] Blob Storage 원격지에서 관리 하기(2) azcopy azcopy의 명령줄 유틸리티를 사용하여 원격지에서 Azure storage내 복사 등의 작업을 수행 할 수 있다.복사 시 인증은 SAS, Oauth, 액세스 키등을 사용한다. azcopy는 원격지와 로컬 뿐만 아니라 아래와 같은 원격지와 원격지에서도 사용가능하다. 로컬 Azure Blob (SAS 또는 OAuth 인증) 로컬 Azure Files (공유/디렉터리 SAS 인증) 로컬 Azure Data Lake Storage Gen 2 (SAS, OAuth 또는 공유 키 인증) Azure Blob (SAS 또는 public)-> Azure Blob (SAS 또는 OAuth 인증) Azure Blob (SAS 또는 공용)-SAS (> Azure Files) Sas (Azure Files)-SAS (> Az..
[Azure] Blob Storage 원격지에서 관리 하기(1) Microsoft Azure Storage Explorer Azure Potal을 이용해서 스토리지를 관리하는 방법 외에 원격지에서 접속하여 관리 할 수 있는 방법이 있다. Microsoft Azure Storage Explorer 다운로드 : https://azure.microsoft.com/en-us/products/storage/storage-explorer/#overview Azure Storage Explorer – cloud storage management | Microsoft Azure Easily manage your Azure storage accounts in the cloud, from Windows, macOS, or Linux, using Azure Storage Explorer. azure.microsoft.com Azure Stora..
[Cloudflare] 4차 도메인(sub-subdomain) SSL/TLS 인증서 적용 하기 개요 기본적으로 클라우드플레어의 Universal 인증서는 4차 도메인(*.*.example.com) 은 적용 되지 않는다. Universal 인증서를 통한 4차 도메인 proxied 적용 후 다음과 같은 오류를 볼수 있다. "net:: ERR_CERT_COMMON_NAME_INVALID" 4차 도메인 SSL 인증서 적용을 위하여 Advance 인증서를 사용하여야 하며 유료이다. Advanced SSL 인증서 적용 클라우드플레어 도메인 - SSL/TLS - Edge Certificates - Order Advanced Certificate "Certficate Hostnames" 항목에 dev.test.example.com 의 경우 *.test.example.com 과 같이 입력 한다. 3차 도메인이 여..
[Cloudflare] API email, zone_ip, api_key 정보 필요 Logpush Logpush 설정 정보. CF -> Analutics -> Logs # GET JOB ID curl -s -H "X-Auth-Email: ${email}" -H "X-Auth-Key: ${api_key}" 'https://api.cloudflare.com/client/v4/zones/'${zone_id}'/logpush/jobs' | jq . { "errors": [], "messages": [], "result": [ { "id": {JOB ID}, "dataset": "firewall_events", "frequency": "high", "kind": "", "enabled": true, "name": null, "logpull_o..