由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 请教JAX-RS大牛?
相关主题
怎么做能提供RESTful的安全性?jwt token 作认证的问题
web services的安全性问题。多大的项目可以考虑microservice?
angular搞cross domain必须用node吗?现在怎么越来越多的公司用cookie了?这不是过时的技術吗?
Twitter发帖求教个quickbooks Oauth的问题
话说hbase是不是用的不多了?有没有人觉得 oauth 是个 shit?
AWS authentication 求推荐HBase的用户验证问题
访问有安全认证的Web Service,再转换成Json,怎么实现比较好?web services和POST 到url有啥区别?
Tomcat 的localhost_access_log含有用户登录信息,怎么能改没有 (转载)如果没有api,有什么办法写网站客户端呢?
相关话题的讨论汇总
话题: token话题: rest话题: web话题: attacks
进入Programming版参与讨论
1 (共1页)
a*f
发帖数: 1790
1
REST API用Spring Security按角色限制访问
现在客户端准备上ios native app,
问题是ios app不支持web session based authentication
如果另外走一个OAuth的验证服务,握手协议后拿到临时的token,怎么能告诉web服务
器这个token是有效的,或者怎么让web服务器去验证这个临时token,然后grant
access to the REST APIs?
还有就是token过期后怎么做challenge,重新生成新的token;用户的密码一开始一定
要保存吗?这个是要求:“Successful authentication requires that the Claimant
prove through a secure authentication protocol that he or she controls the
token. Online guessing, replay, session hijacking, and eavesdropping attacks
are resisted. Protocols are also required to be at least weakly resistant
to man-in-the middle attacks as defined in Section 8.2.2. ”
做过REST移动客户端的大牛指点指点?
g*****g
发帖数: 34805
2
所谓web session,是在server端的,client端只有一个cookie,rest call的时候带上
,哪有不支持一说。cookie过期就重新验证呗。

Claimant
the
attacks

【在 a*f 的大作中提到】
: REST API用Spring Security按角色限制访问
: 现在客户端准备上ios native app,
: 问题是ios app不支持web session based authentication
: 如果另外走一个OAuth的验证服务,握手协议后拿到临时的token,怎么能告诉web服务
: 器这个token是有效的,或者怎么让web服务器去验证这个临时token,然后grant
: access to the REST APIs?
: 还有就是token过期后怎么做challenge,重新生成新的token;用户的密码一开始一定
: 要保存吗?这个是要求:“Successful authentication requires that the Claimant
: prove through a secure authentication protocol that he or she controls the
: token. Online guessing, replay, session hijacking, and eavesdropping attacks

a*f
发帖数: 1790
3
大牛,用xcode写的ios app,考虑是否用http client做rest call,不是web browser
,没有cookie
或者http request返回的cookie直接保存在内存里面,下个http request再attach上去
,这样做法可行吗?

【在 g*****g 的大作中提到】
: 所谓web session,是在server端的,client端只有一个cookie,rest call的时候带上
: ,哪有不支持一说。cookie过期就重新验证呗。
:
: Claimant
: the
: attacks

g*****g
发帖数: 34805
4
浏览器不就是这么做的,任何http client类库,都有这方面的功能。

browser

【在 a*f 的大作中提到】
: 大牛,用xcode写的ios app,考虑是否用http client做rest call,不是web browser
: ,没有cookie
: 或者http request返回的cookie直接保存在内存里面,下个http request再attach上去
: ,这样做法可行吗?

k****i
发帖数: 1072
5
token存本地,通过header传回server。研究一下bearer token的原理

Claimant
the
attacks

【在 a*f 的大作中提到】
: REST API用Spring Security按角色限制访问
: 现在客户端准备上ios native app,
: 问题是ios app不支持web session based authentication
: 如果另外走一个OAuth的验证服务,握手协议后拿到临时的token,怎么能告诉web服务
: 器这个token是有效的,或者怎么让web服务器去验证这个临时token,然后grant
: access to the REST APIs?
: 还有就是token过期后怎么做challenge,重新生成新的token;用户的密码一开始一定
: 要保存吗?这个是要求:“Successful authentication requires that the Claimant
: prove through a secure authentication protocol that he or she controls the
: token. Online guessing, replay, session hijacking, and eavesdropping attacks

a*f
发帖数: 1790
6
看到这样一段讨论:"An attacker may generate a bogus token or modify the
token contents (such as the authentication or attribute statements) of an
existing token, causing the resource server to grant inappropriate access to
the client. "
怎样预防这种情形呢?token里面加上时间和IP地址一起散列成本好像有点太高。或者
只加一个IP和一个sequence number? 几分钟后token失效,重新challenge生成新的
token把sequence number增加?还是用时间比较好?还有个问题就是好像这种验证方式
在server端需要特殊处理,传统的Spring Security好像不能支持。

【在 k****i 的大作中提到】
: token存本地,通过header传回server。研究一下bearer token的原理
:
: Claimant
: the
: attacks

g*****g
发帖数: 34805
7
通常login cookie有效时间比较短,问题不大。remember-me cookie时间比较长,相对
比较危险。
对安全要求高的应用可以看看这个策略。Spring security当然是可以支持的,事实上
Spring security是比较复杂而强大的framework。
http://jaspan.com/improved_persistent_login_cookie_best_practic
http://docs.spring.io/spring-security/site/docs/3.0.x/reference
另外,只要你用https,token并不是那么容易丢的。

to

【在 a*f 的大作中提到】
: 看到这样一段讨论:"An attacker may generate a bogus token or modify the
: token contents (such as the authentication or attribute statements) of an
: existing token, causing the resource server to grant inappropriate access to
: the client. "
: 怎样预防这种情形呢?token里面加上时间和IP地址一起散列成本好像有点太高。或者
: 只加一个IP和一个sequence number? 几分钟后token失效,重新challenge生成新的
: token把sequence number增加?还是用时间比较好?还有个问题就是好像这种验证方式
: 在server端需要特殊处理,传统的Spring Security好像不能支持。

l**********n
发帖数: 8443
8
you can sign the cookie with secret.

to

【在 a*f 的大作中提到】
: 看到这样一段讨论:"An attacker may generate a bogus token or modify the
: token contents (such as the authentication or attribute statements) of an
: existing token, causing the resource server to grant inappropriate access to
: the client. "
: 怎样预防这种情形呢?token里面加上时间和IP地址一起散列成本好像有点太高。或者
: 只加一个IP和一个sequence number? 几分钟后token失效,重新challenge生成新的
: token把sequence number增加?还是用时间比较好?还有个问题就是好像这种验证方式
: 在server端需要特殊处理,传统的Spring Security好像不能支持。

k****i
发帖数: 1072
9
你这是要自造一个oauth provider的节奏?否则大多数的JWT实现都有signature啊。

to

【在 a*f 的大作中提到】
: 看到这样一段讨论:"An attacker may generate a bogus token or modify the
: token contents (such as the authentication or attribute statements) of an
: existing token, causing the resource server to grant inappropriate access to
: the client. "
: 怎样预防这种情形呢?token里面加上时间和IP地址一起散列成本好像有点太高。或者
: 只加一个IP和一个sequence number? 几分钟后token失效,重新challenge生成新的
: token把sequence number增加?还是用时间比较好?还有个问题就是好像这种验证方式
: 在server端需要特殊处理,传统的Spring Security好像不能支持。

c*********e
发帖数: 16335
10
ios app不支持web session based authentication ?
啥意思? 你不能够用basic authentication来把username,password放header里面?

Claimant
the
attacks

【在 a*f 的大作中提到】
: REST API用Spring Security按角色限制访问
: 现在客户端准备上ios native app,
: 问题是ios app不支持web session based authentication
: 如果另外走一个OAuth的验证服务,握手协议后拿到临时的token,怎么能告诉web服务
: 器这个token是有效的,或者怎么让web服务器去验证这个临时token,然后grant
: access to the REST APIs?
: 还有就是token过期后怎么做challenge,重新生成新的token;用户的密码一开始一定
: 要保存吗?这个是要求:“Successful authentication requires that the Claimant
: prove through a secure authentication protocol that he or she controls the
: token. Online guessing, replay, session hijacking, and eavesdropping attacks

1 (共1页)
进入Programming版参与讨论
相关主题
如果没有api,有什么办法写网站客户端呢?话说hbase是不是用的不多了?
貌似Play秒杀Jersey?AWS authentication 求推荐
请教一个Android的简单HTTP REST编程问题 (转载)访问有安全认证的Web Service,再转换成Json,怎么实现比较好?
我想在服务器端实现Restful服务,用什么方法实现比较好?Tomcat 的localhost_access_log含有用户登录信息,怎么能改没有 (转载)
怎么做能提供RESTful的安全性?jwt token 作认证的问题
web services的安全性问题。多大的项目可以考虑microservice?
angular搞cross domain必须用node吗?现在怎么越来越多的公司用cookie了?这不是过时的技術吗?
Twitter发帖求教个quickbooks Oauth的问题
相关话题的讨论汇总
话题: token话题: rest话题: web话题: attacks