Skip to content

Gea-Suan Lin's BLOG

幹壞事是進步最大的原動力

Gea-Suan Lin's BLOG

Tag: account

Flickr 宣佈推出自己的登入系統,不過得排隊等...

Flickr 在被 SmugMug 收購後就開始在整理架構,其中一塊是把本來綁定 Yahoo! 的登入拿掉,現在官方推出計畫了:「Flickr login freedom is here.」。

不過不是所有人都馬上可以用,而是逐步開放給使用者:

The first page of the login experience has already been updated with a new look, but you will continue to log in to your Flickr account with your Yahoo credentials as you always have until the rollout reaches you.

來繼續等...

Author Gea-Suan LinPosted on March 6, 2019Categories Computer, Murmuring, Network, ServiceTags account, flickr, login, smugmug, yahoo2 Comments on Flickr 宣佈推出自己的登入系統,不過得排隊等...

買 Flickr 帳號...

在去年四月 SmugMug 宣佈從 Yahoo! (Oath) 手上買下 Flickr 後,SmugMug 就開始規劃之後的 Flickr 的服務,在去年十一月的時候宣佈走向會是 premium service,並且會大幅限制免費帳戶的容量:強硬的將免費帳號的照片刪除到 1000 張,而不是保留舊的照片不讓你上傳 (參考「Flickr 限縮免費帳號的容量」這邊聊到的事情)。

下載下來發現有 24GB (也不算多,主要是有很多舊的照片在上面有點懷念?),然後在 open source software 裡面測了一些軟體,看起來沒有適合的 (本來想順便弄個服務練個手感),就回去買 Flickr Pro 了...

算是某種回鍋?印象中第一次買 Flickr Pro 是還在學校的時候買的,記憶比較深刻的應該是我是在 Yahoo! 宣佈買下 Flickr 前幾個禮拜買的 (買了以後 Flickr Pro 降價,並且宣佈既有的使用者延長期限),所以應該是 2005 的時候:

Yahoo! acquired Ludicorp and Flickr in March 2005. The acquisition reportedly cost $22 million to $25 million.

然後在 Yahoo! 宣佈免費帳號有 1TB 空間的時候就沒買了... 現在回鍋來繼續用,不過使用行為應該還是不會變?(拿手機隨手拍的照片習慣丟 social network 上) 只能靠 IFTTT 之類的工具同步過去了。

Author Gea-Suan LinPosted on February 4, 2019February 4, 2019Categories Computer, Murmuring, Network, ServiceTags account, flickr, hosting, image, photo, pro, service, smugmug, yahooLeave a comment on 買 Flickr 帳號...

用 procmail 判斷信件是否有過 DKIM Signature

這年頭自己維護 mail account 的情況比較少了,所以資料不太好找,測出來寫下來讓其他人也可以用...

這邊說的是透過 procmail 判斷信件是否符合 DKIM Signature,然後加上 header。

如果是 Ubuntu 環境,首先在要裝上 python-dkim (不是 python3-dkim):

sudo apt install -y python-dkim

我們需要裡面的 dkimverify 程式透過 stdin 讀信件進去,然後透過 exit code 告知有沒有成功。

對應的 .procmailrc 是這樣:

# DKIM
:0
* ^DKIM-Signature:
{
    :0BHWf
    * ? /usr/bin/dkimverify
    | /usr/bin/formail -A "X-Procmail-DKIMVerify: pass"
    :0Ef
    | /usr/bin/formail -A "X-Procmail-DKIMVerify: bad"
}

裡面大多數的設定說明可以參考 procmailrc 的 manpage,這邊只就 magic keyword 說明一下。

BH 是 body 與 header 都要判斷,而 f 是把程式當作 filter,把信件從 stdin 丟進去,然後將 stdout 輸出的結果往下繼續處理,W 是看程式執行執行結果 (看 exit code) 決定要不要跑設定的指令。

E 表示上面的那格沒有跑到的話就跑自己這格,類似於 if-then-else 裡面的 else。

我發現這個需求在我的 issue tracking system 內是 2016 年 10 月開的,總算解掉他了...

Author Gea-Suan LinPosted on January 10, 2019Categories Computer, Mail, Murmuring, Network, Security, SpamTags account, dkim, mail, procmail, python, verifyLeave a comment on 用 procmail 判斷信件是否有過 DKIM Signature

DyanmoDB 推出 Transaction

AWS 對 DynamoDB 推出了 transaction 功能:「New – Amazon DynamoDB Transactions」。

這次推出的 transaction 還是很受限,不像是 RDBMS 裡那種可以到處讀讀寫寫然後到 SERIALIZABLE 等級的 ACID transaction。

目前提供兩種操作 TransactWriteItems 與 TransactGetItems:

  • TransactWriteItems, a batch operation that contains a write set, with one or more PutItem, UpdateItem, and DeleteItem operations. TransactWriteItems can optionally check for prerequisite conditions that must be satisfied before making updates. These conditions may involve the same or different items than those in the write set. If any condition is not met, the transaction is rejected.
  • TransactGetItems, a batch operation that contains a read set, with one or more GetItem operations. If a TransactGetItems request is issued on an item that is part of an active write transaction, the read transaction is canceled. To get the previously committed value, you can use a standard read.

主要是 TransactWriteItems 可以解決 ACID transaction 問題。而 TransactGetItems 算是搭配使用確保讀到的資料有一致性。

不過限制相當多,首先是修改數量的問題:

Each transaction can include up to 10 unique items or up to 4 MB of data, including conditions.

再來是限制同帳號且同區域 (這點應該還好):

DynamoDB transactions provide developers atomicity, consistency, isolation, and durability (ACID) across one or more tables within a single AWS account and region.

不管如何,這樣就更方便在上面堆東西了...

Author Gea-Suan LinPosted on November 28, 2018Categories AWS, Cloud, Computer, Murmuring, Network, ServiceTags account, acid, amazon, aws, cloud, data, database, db, dynamodb, nosql, region, service, sql, transactionLeave a comment on DyanmoDB 推出 Transaction

把 Trac 改成 Form Login 後 XMLRPC 不會動的問題...

我自己再用的 Trac 本來是走 HTTP 的 Authorization header 登入,但這樣每次重開瀏覽器就要登入一次,覺得麻煩... 就想要找套件改成用 HTML form login。

目前比較有在維護的應該是 AccountManagerPlugin 這套,內建就支援本機密碼,也支援 plugin 掛其他外部服務進去。

但掛進去後發現本來的自動開票機 (i.e. 用 crontab 開票) 就沒辦法登入了,最後找到得用 HttpAuthPlugin 處理。這個套件一開頭就寫了他也是為了 XmlRpcPlugin 而寫的:

This plugin allows you to protect certain paths with HTTP authentication. The AccountManagerPlugin is used to check passwords.

Primarily this is meant to be used with the XmlRpcPlugin, so it will work while using AccountManager's form-based logins.

就是遇到同樣的問題...

Author Gea-Suan LinPosted on October 6, 2018Categories Computer, Murmuring, Network, Service, SoftwareTags account, auth, authorization, extension, form, header, html, http, login, manager, plugin, rpc, trac, xml, xmlrpcLeave a comment on 把 Trac 改成 Form Login 後 XMLRPC 不會動的問題...

強制關閉 Google Chrome 的登入功能

最近吵的蠻凶的一個話題... 當你在 Google Chrome 瀏覽器內登入 Google 帳號後 (像是 Gmail),你的 Google Chrome 就會自動也一起登入了。

官方目前拒絕承認這是個錯誤的設計,所以現在大家都在找 workaround 解。目前看到比較好的方式是這篇,提供了設定方式 (包括 Windows 與 Mac 平台):「Disable Google Chrome Sign In and Sync」。

裡面有兩個步驟,第一個 SyncDisabled 設為 true 是把同步功能關掉,第二個 RestrictSigninToPattern 設為 .*@example.com 是把同時登入功能限制在 example.com 上,而這個 domain 則是在 RFC 2606 (Reserved Top Level DNS Names) 被保護起來,不開放任何單位註冊,也就是讓 Chrome 不可能找到符合的條件。

另外一個方法是跳到 Firefox,但順暢度應該還是目前最主要的障礙吧...

Author Gea-Suan LinPosted on September 25, 2018April 24, 2023Categories Browser, Computer, GoogleChrome, Murmuring, Network, Privacy, Security, Service, SoftwareTags account, browser, chrome, gmail, google, login, privacy, security, workaround2 Comments on 強制關閉 Google Chrome 的登入功能

nginx 透過 libnginx-mod-http-auth-pam + libpam-ldap 串起 LDAP

如果 nginx 想接 LDAP 認證,網路上找到的資料主要都是透過 nginx 的模組直接支援,但這需要自己 compile 一個出來 (因為內建的好像都沒支援),對於後續維護不太方便,就懶了... 後來研究出來的方法是 nginx 接 PAM,再用 PAM 接上 LDAP,這些都有現成套件可以一路串起來。

首先是 nginx 要裝 PPA 版 (像是「NGINX Stable : “Nginx” team」這個版本),裡面的 nginx-full 會包括 libnginx-mod-http-auth-pam,接下來是安裝 libpam-ldap,這樣套件就裝好啦...

設定的部份,nginx 內這樣設:

    location ~ /test {
        auth_pam "Secure Zone";
        auth_pam_service_name "nginx-ldap";
    }

然後 /etc/pam.d/nginx-ldap 裡面掛上 LDAP 就可以了:

auth    required     pam_ldap.so
account required     pam_ldap.so

重點在於 /etc/ldap.conf 內的設定,我是只 base dc=example,dc=com (base 是什麼) 與 uri ldap:/// (LDAP 伺服器在哪),其他都註解掉。

這樣是比較麻煩沒錯,不過軟體其他人都包好了,這樣反而省了維護軟體的功夫...

Author Gea-Suan LinPosted on April 16, 2018Categories Computer, Murmuring, Network, Security, Service, Software, WWWTags account, auth, ldap, nginx, pam, serverLeave a comment on nginx 透過 libnginx-mod-http-auth-pam + libpam-ldap 串起 LDAP

AWS Switch Role 的連結

Switch Role 讓你可以在兩個 AWS 帳號間切換身份,可以參考「Switching to a Role (AWS Management Console)」這邊的說明。而剛剛看到這則 tweet,直接拆解 AWS 中 Switch Role 的連結,其實也就是文件裡面寫的 Tip:

I use browser bookmarks to switch between different cross-account IAM assumed roles in the AWS console.

Here's the URL format (remove space between slashes):

https:/ /signin.aws.amazon.com/switchrole?account=012345678901&roleName=admin&displayName=tag-admin

— Eric Hammond (@esh) February 6, 2018

另外有 tweet 的 reply 有提到還可以加上顏色:

You can even add something like &color=F2B0A9
There is also a way to redirect to a page after switching, but I can't remember the parameter name

— Ben Bridts‏ (@ikB3N) February 6, 2018

所以整體的網址就變成 https://signin.aws.amazon.com/switchrole?account=012345678901&roleName=admin&displayName=tag-admin&color=F2B0A9 這樣。

Author Gea-Suan LinPosted on February 7, 2018Categories AWS, Cloud, Computer, Murmuring, Network, Security, Service, WWWTags account, amazon, aws, cloud, iam, role, switch, urlLeave a comment on AWS Switch Role 的連結

GCP 對於設計使用者帳號時給的建議

我第一眼看到的時候還在想是哪個 content farm 的標題,我應該沒有訂到 content farm 的 RSS feed 才對... 結果發現是 Google Cloud Platform 上的文章:「12 best practices for user account, authorization and password management」。

然後看完內容後還是有種 content farm 的感覺... (歡樂)

Author Gea-Suan LinPosted on February 1, 2018Categories Blog, Cloud, Computer, GCP, Murmuring, Network, RSS, SecurityTags account, cloud, content, farm, gcp, google, management, password, platform, security, userLeave a comment on GCP 對於設計使用者帳號時給的建議

PostgreSQL 的官方 Twitter 帳號

看到 PostgreSQL 發表官方 Twitter 帳號的消息:「Announcing @postgresql」。

The PostgreSQL Global Development Group is pleased to announce the launch of the official community Twitter handle: https://twitter.com/postgresql

看起來是把官網資訊延伸出去... 在另外一個平台上也可以看到而已:

@postgresql will contain a mix of automatic and manually curated postings from a group of volunteers that feature various aspects of PostgreSQL and the community-at-large. Content will contain a mix of news, advice, and highlights around PostgreSQL, and enable the PostgreSQL Global Development Group to further engage with the community. If you would like for @postgresql to highlight PostgreSQL-oriented content, we encourage you to reach out to @postgresql via Twitter’s direct message feature.

本來的 Planet PostgreSQL 也會繼續服務:

The live feed for blog entries syndicated from Planet PostgreSQL will continue to be available at https://twitter.com/planetpostgres

還是繼續用 RSS 訂閱就好 XD

Author Gea-Suan LinPosted on January 9, 2018Categories Computer, Database, Murmuring, Network, PostgreSQL, RSS, Service, Social, Software, WWWTags account, database, db, network, news, pgsql, postgresql, social, twitterLeave a comment on PostgreSQL 的官方 Twitter 帳號

Posts navigation

Previous page Page 1 Page 2 Page 3 Page 4 Next page
  • Live 記錄
  • 訂閱 (subscribe)
  • 關於我 (about me)

Recent Comments

  • Gea-Suan Lin on 限制流量的方式 (rate limit)
  • Gea-Suan Lin on 處理 rTorrent 會卡頓的問題
  • Gea-Suan Lin on 在 Fly.io 上面跑 PHP
  • Gea-Suan Lin on 用 RSS-Bridge 接服務
  • 慕凡 on DHH 一系列從雲端搬回地端的文章

Archives

  • June 2023 (4)
  • May 2023 (32)
  • April 2023 (29)
  • March 2023 (30)
  • February 2023 (22)
  • January 2023 (19)
  • December 2022 (22)
  • November 2022 (32)
  • October 2022 (36)
  • September 2022 (18)
  • August 2022 (38)
  • July 2022 (36)
  • June 2022 (28)
  • May 2022 (31)
  • April 2022 (35)
  • March 2022 (43)
  • February 2022 (40)
  • January 2022 (22)
  • December 2021 (28)
  • November 2021 (26)
  • October 2021 (31)
  • September 2021 (44)
  • August 2021 (24)
  • July 2021 (28)
  • June 2021 (31)
  • May 2021 (32)
  • April 2021 (24)
  • March 2021 (51)
  • February 2021 (34)
  • January 2021 (29)
  • December 2020 (38)
  • November 2020 (42)
  • October 2020 (40)
  • September 2020 (23)
  • August 2020 (32)
  • July 2020 (35)
  • June 2020 (22)
  • May 2020 (36)
  • April 2020 (33)
  • March 2020 (18)
  • February 2020 (28)
  • January 2020 (34)
  • December 2019 (43)
  • November 2019 (22)
  • October 2019 (24)
  • September 2019 (33)
  • August 2019 (30)
  • July 2019 (40)
  • June 2019 (37)
  • May 2019 (39)
  • April 2019 (30)
  • March 2019 (62)
  • February 2019 (35)
  • January 2019 (38)
  • December 2018 (36)
  • November 2018 (45)
  • October 2018 (19)
  • September 2018 (37)
  • August 2018 (28)
  • July 2018 (29)
  • June 2018 (25)
  • May 2018 (37)
  • April 2018 (36)
  • March 2018 (30)
  • February 2018 (57)
  • January 2018 (53)
  • December 2017 (84)
  • November 2017 (117)
  • October 2017 (93)
  • September 2017 (60)
  • August 2017 (37)
  • July 2017 (41)
  • June 2017 (37)
  • May 2017 (59)
  • April 2017 (55)
  • March 2017 (55)
  • February 2017 (35)
  • January 2017 (42)
  • December 2016 (48)
  • November 2016 (32)
  • October 2016 (35)
  • September 2016 (78)
  • August 2016 (69)
  • July 2016 (19)
  • June 2016 (42)
  • May 2016 (61)
  • April 2016 (51)
  • March 2016 (74)
  • February 2016 (87)
  • January 2016 (31)
  • December 2015 (36)
  • November 2015 (61)
  • October 2015 (72)
  • September 2015 (53)
  • August 2015 (42)
  • July 2015 (38)
  • June 2015 (30)
  • May 2015 (18)
  • April 2015 (57)
  • March 2015 (41)
  • February 2015 (50)
  • January 2015 (35)
  • December 2014 (50)
  • November 2014 (56)
  • October 2014 (41)
  • September 2014 (37)
  • August 2014 (37)
  • July 2014 (28)
  • June 2014 (50)
  • May 2014 (32)
  • April 2014 (46)
  • March 2014 (38)
  • February 2014 (29)
  • January 2014 (52)
  • December 2013 (50)
  • November 2013 (45)
  • October 2013 (40)
  • September 2013 (48)
  • August 2013 (22)
  • July 2013 (25)
  • June 2013 (13)
  • May 2013 (16)
  • April 2013 (28)
  • March 2013 (37)
  • February 2013 (36)
  • January 2013 (57)
  • December 2012 (44)
  • November 2012 (10)
  • October 2012 (12)
  • September 2012 (21)
  • August 2012 (21)
  • July 2012 (25)
  • June 2012 (8)
  • May 2012 (10)
  • April 2012 (11)
  • March 2012 (10)
  • February 2012 (11)
  • January 2012 (5)
  • December 2011 (13)
  • November 2011 (12)
  • October 2011 (10)
  • September 2011 (7)
  • August 2011 (5)
  • July 2011 (11)
  • June 2011 (21)
  • May 2011 (22)
  • April 2011 (36)
  • March 2011 (43)
  • February 2011 (23)
  • January 2011 (24)
  • December 2010 (34)
  • November 2010 (19)
  • October 2010 (16)
  • September 2010 (15)
  • August 2010 (10)
  • July 2010 (12)
  • June 2010 (3)
  • May 2010 (3)
  • April 2010 (4)
  • March 2010 (8)
  • February 2010 (14)
  • January 2010 (13)
  • December 2009 (16)
  • November 2009 (28)
  • October 2009 (24)
  • September 2009 (12)
  • August 2009 (7)
  • July 2009 (10)
  • June 2009 (11)
  • May 2009 (22)
  • April 2009 (21)
  • March 2009 (18)
  • February 2009 (7)
  • January 2009 (32)
  • December 2008 (19)
  • November 2008 (12)
  • October 2008 (15)
  • September 2008 (14)
  • August 2008 (15)
  • July 2008 (18)
  • June 2008 (20)
  • May 2008 (19)
  • April 2008 (27)
  • March 2008 (22)
  • February 2008 (21)
  • January 2008 (15)
  • December 2007 (22)
  • November 2007 (17)
  • October 2007 (29)
  • September 2007 (31)
  • August 2007 (34)
  • July 2007 (31)
  • June 2007 (36)
  • May 2007 (23)
  • April 2007 (22)
  • March 2007 (30)
  • February 2007 (50)
  • January 2007 (75)
  • December 2006 (48)
  • November 2006 (59)
  • October 2006 (89)
  • September 2006 (29)
  • August 2006 (48)
  • July 2006 (14)
  • June 2006 (35)
  • May 2006 (62)
  • April 2006 (63)
  • March 2006 (72)
  • February 2006 (83)
  • January 2006 (56)
  • December 2005 (46)
  • November 2005 (60)
  • October 2005 (27)
  • September 2005 (54)
  • August 2005 (83)

Tags

  • amazon
  • api
  • aws
  • browser
  • cdn
  • certificate
  • chrome
  • cloud
  • cloudflare
  • cpu
  • data
  • database
  • db
  • dns
  • ec2
  • engine
  • facebook
  • firefox
  • github
  • google
  • https
  • image
  • instance
  • javascript
  • js
  • linux
  • mysql
  • network
  • open
  • percona
  • performance
  • php
  • pricing
  • privacy
  • rdbms
  • security
  • server
  • service
  • source
  • speed
  • ssl
  • storage
  • tls
  • ubuntu
  • web

Blogroll

  • Ashley's BLOG
  • Gea-Suan Lin’s BLOG for Class^H^H^H^H^H ACG
  • Gea-Suan Lin’s BLOG for Networking
  • Gea-Suan Lin’s BLOG for Work
  • Gea-Suan Lin's Blog
  • Gea-Suan Lin's Wiki
  • Zonble
  • 蔡依林的部落格
Gea-Suan Lin's BLOG Proudly powered by WordPress