load_components_and_configurations fails when trying to get all components and configurations from one QM project area
还没有人认领这个 Issue。
评估
调研方向
从 elmclient/_qm.py 中的 load_components_and_configurations() 开始,该函数由 find_local_component() 调用,并在仅能访问一个项目区域的情况下复现 QM components endpoint 返回的 403。跟踪组件请求的构造方式,并验证无需具备读取其他项目区域的权限即可获取可访问的组件。
由索引模型根据 Issue 内容生成。
描述
Hi there,
First of all - I am not an OSLC expert, just a user who wants to do something with this package.
Currently I am a user which has access only to some particular QM project areas (not all project areas).
So when trying to find a specific component (which is accessible to me), I use this simple code snipped:
import elmclient.server as elmserver
...
obj_server = elmserver.JazzTeamServer(str_host, str_user, str_pass, verifysslcerts=False, jtsappstring="jts:jts", appstring="qm", cachingcontrol=0)
obj_app = obj_server.find_app('qm', ok_to_create=True)
obj_project = obj_app.find_project(str_project_area_name)
obj_component = obj_project.find_local_component(str_component_name)
Which throws the following error:
Traceback (most recent call last):
File "c:\XXX\.venv\Lib\site-packages\elmclient\_qm.py", line 296, in find_local_component
self.load_components_and_configurations()
File "c:\XXX\.venv\Lib\site-packages\elmclient\_qm.py", line 112, in load_components_and_configurations
crx = self.execute_get_xml( components_uri, intent="Retrieve component definition" )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\XXX\.venv\Lib\site-packages\elmclient\httpops.py", line 139, in execute_get_xml
response = request.execute( **kwargs )
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\XXX\.venv\Lib\site-packages\elmclient\httpops.py", line 334, in execute
return self._execute_request( no_error_log=no_error_log, close=close, **kwargs )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\XXX\.venv\Lib\site-packages\elmclient\httpops.py", line 343, in _execute_request
result = self._execute_one_request_with_login( no_error_log=no_error_log, close=close, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\XXX\.venv\Lib\site-packages\elmclient\httpops.py", line 624, in _execute_one_request_with_login
response.raise_for_status()
File "c:\XXX\.venv\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://host/qm/oslc_config/resources/com.ibm.team.vvc.Component
When trying to access the URL https://host/qm/oslc_config/resources/com.ibm.team.vvc.Component using my web browser, I get the following error message displayed:
The user "XXX" does not have permission to read item "_xxxxxxxxxxxxxxxxxxxxxxxx", which has the "ProjectArea" item type.
It seems that it querys all components of all project areas - including those which are not accessible for me - for some reason.
Does anybody know how to evade this issue?
- 主要语言
- HTML
- 星标
- 52
- 派生
- 32
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
IBM/ELM-Python-Client 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
IBM/ELM-Python-Client#138 · 11 条评论 ·
-
难度 3/5 1-2 天 新手友好度 48/100
IBM/ELM-Python-Client#131 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 42/100
IBM/ELM-Python-Client#112 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 52/100
IBM/ELM-Python-Client#107 · 6 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
IBM/ELM-Python-Client#65 · 2 条评论 ·
查看 IBM/ELM-Python-Client 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
speaches-ai/speaches#678 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's 未关闭bug ecr
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
conda-forge/spacy-feedstock#177 ·
-
难度 2/5 1-3 小时 新手友好度 70/100