Session ID是什么?
会话ID
在计算机科学中,会话标识符,会话ID或会话令牌是一块使用的数据网络通信(通常是通过HTTP)来识别一个会话,一系列相关的信息交流。会话标识符成为必要的通信基础设施的情况下,使用无状态的协议(如HTTP)。例如,一个买家访问卖家的网站,想收集一些文章在一个虚拟的购物车,然后完成购物网站的结帐页面。这通常需要一个持续的沟通,有几个网页是由客户端请求,由服务器发回给他们。在这种情况下,它是非常重要的跟踪购物者的购物车的当前状态,会话ID是实现这一目标的方法之一。
会话ID通常是授予他第一次访问一个网站的访问者。它是不同的用户ID在该会议通常是短暂的(到期后在预设的时间处于非活动状态,这可能是几分钟或几小时),并且可能成为无效后,已经达到一定的目标(例如,一旦买方最终确定他的命令,他不能使用相同的会话ID添加更多的项目)。
通常用来识别会话ID的用户已经登录到一个网站,他们可以被攻击者劫持了会议,并获得潜在的特权。会话ID是往往是一个长期的,减少的概率获得一个有效的穷举搜索,通过随机生成的字符串。许多服务器的客户端,执行额外的验证情况下,攻击者已经获得了会话ID。锁定会话ID到客户端的IP地址是一种简单而有效的措施,只要攻击者无法连接到服务器相同的地址。
甲的会话令牌是一个唯一的标识符,通常的形式产生的哈希值的哈希函数产生的,从服务器发送到客户端,以确定在当前交互会话。通常的客户端存储和令牌发送一个HTTP cookie和/或发送GET或POST查询作为参数。使用会话令牌的原因是,客户端只需要处理的标识符(一小块的数据,这是毫无意义的,因此不存在安全性风险) – 所有的会话数据存储在服务器上(通常在一个数据库中,以客户端不直接访问)连接到该标识符。会话ID有很多缺点,它可能是不够的,以满足一些开发人员的需求。模糊许多开发人员使用其他的逻辑来标识会话。
一些编程语言中使用的名字命名时,他们的cookie的例子包括JSESSIONID(JSP),PHPSESSID(PHP),ASPSESSIONID(微软ASP)。
What is our Session ID?
Session ID
In computer science, a session identifier, session ID or session token is a piece of data that is used in network communications (often over HTTP) to identify a session, a series of related message exchanges. Session identifiers become necessary in cases where the communications infrastructure uses a stateless protocol such as HTTP. For example, a buyer who visits a seller’s site wants to collect a number of articles in a virtual shopping cart and then finalize the shopping by going to the site’s checkout page. This typically involves an ongoing communication where several webpages are requested by the client and sent back to them by the server. In such a situation, it is vital to keep track of the current state of the shopper’s cart, and a session ID is one way to achieve that goal.
A session ID is typically granted to a visitor on his first visit to a site. It is different from a user ID in that sessions are typically short-lived (they expire after a preset time of inactivity which may be minutes or hours) and may become invalid after a certain goal has been met (for example, once the buyer has finalized his order, he cannot use the same session ID to add more items).
As session IDs are often used to identify a user that has logged into a website, they can be used by an attacker to hijack the session and obtain potential privileges. A session ID is often a long, randomly generated string to decrease the probability of obtaining a valid one by means of a brute-force search. Many servers perform additional verification of the client, in case the attacker has obtained the session ID. Locking a session ID to the client’s IP address is a simple and effective measure as long as the attacker cannot connect to the server from the same address.
A session token is a unique identifier, usually in the form of a hash generated by a hash function that is generated and sent from a server to a client to identify the current interaction session. The client usually stores and sends the token as an HTTP cookie and/or sends it as a parameter in GET or POST queries. The reason to use session tokens is that the client only has to handle the identifier (a small piece of data which is otherwise meaningless and thus presents no security risk) – all session data is stored on the server (usually in a database, to which the client does not have direct access) linked to that identifier. There are many drawbacks of session id and it may not be enough to fulfill some developer requirements.[vague] Many developers use other logic to identify the session.
Examples of the names that some programming languages use when naming their cookie include JSESSIONID (JSP), PHPSESSID (PHP), and ASPSESSIONID (Microsoft ASP).
Session ID是什麼?
會話ID
在計算機科學中,會話標識符,會話ID或會話令牌是一塊使用的數據網絡通信(通常是通過HTTP)來識別一個會話,一系列相關的信息交流。會話標識符成為必要的通信基礎設施的情況下,使用無狀態的協議(如HTTP)。例如,一個買家訪問賣家的網站,想收集一些文章在一個虛擬的購物車,然後完成購物網站的結帳頁面。這通常需要一個持續的溝通,有幾個網頁是由客戶端請求,由服務器發回給他們。在這種情況下,它是非常重要的跟踪購物者的購物車的當前狀態,會話ID是實現這一目標的方法之一。
會話ID通常是授予他第一次訪問一個網站的訪問者。它是不同的用戶ID在該會議通常是短暫的(到期後在預設的時間處於非活動狀態,這可能是幾分鐘或幾小時),並且可能成為無效後,已經達到一定的目標(例如,一旦買方最終確定他的命令,他不能使用相同的會話ID添加更多的項目)。
通常用來識別會話ID的用戶已經登錄到一個網站,他們可以被攻擊者劫持了會議,並獲得潛在的特權。會話ID是往往是一個長期的,減少的概率獲得一個有效的窮舉搜索,通過隨機生成的字符串。許多服務器的客戶端,執行額外的驗證情況下,攻擊者已經獲得了會話ID。鎖定會話ID到客戶端的IP地址是一種簡單而有效的措施,只要攻擊者無法連接到服務器相同的地址。
甲的會話令牌是一個唯一的標識符,通常的形式產生的哈希值的哈希函數產生的,從服務器發送到客戶端,以確定在當前交互會話。通常的客戶端存儲和令牌發送一個HTTP cookie和/或發送GET或POST查詢作為參數。使用會話令牌的原因是,客戶端只需要處理的標識符(一小塊的數據,這是毫無意義的,因此不存在安全性風險) – 所有的會話數據存儲在服務器上(通常在一個數據庫中,以客戶端不直接訪問)連接到該標識符。會話ID有很多缺點,它可能是不夠的,以滿足一些開發人員的需求。模糊許多開發人員使用其他的邏輯來標識會話。
一些編程語言中使用的名字命名時,他們的cookie的例子包括JSESSIONID(JSP),PHPSESSID(PHP),ASPSESSIONID(微軟ASP)。