Commit Graph

80 Commits

Author SHA1 Message Date
Wu Wenxiang
4e06ed4a5a feat: region field change to optional in login API
region filed default value is CONF.openstack.default_region

Change-Id: I11be6339d5f0d74499f0dd3b28664c27ace43b36
2024-08-21 16:02:00 +08:00
zhuboxiang
d3c48c17f8 fix: Use update instead of insert
If insert will add a new data when the item exists.

Fix for this commit: https://review.opendev.org/c/openstack/skyline-apiserver/+/920163

Change-Id: I9c1cf197c1eb611ae81f072c9b35898414a2431b
2024-05-24 15:03:57 +08:00
resitdemir
ce7d977df4 fix: Update databases package version
Update databases package with compatiple sqlAlcehemy

Change-Id: If4a91e38d45a1a90ed27e9f4c6303955c07e83d8
2024-05-22 12:25:01 +00:00
Michal Arbet
eea81cef1e Fix skyline-apiserver on python3.11
Bump pydantic version which fixes skyline-apiserver
when running under python3.11.

Closes-Bug: #2047145
Change-Id: Idb1897f64ffaf0cd0fbee4f7f198935386a5f599
2024-04-08 17:11:16 +08:00
Florian Haftmann
0af15c5687 fix: Explicit host header in HTTP redirects
Configuration for nginx is now generated in a way such that redirects
have a suitable Host header, which is important e.g. to run skyline
on k8s.

Change-Id: I89503dcbcf988f3e13781d137fc1fde377c3076d
2024-01-24 13:03:13 +01:00
Wenxiang Wu
ce10b6691f fix: user login failure due to no role assignment to its default project
This bug start from: https://review.opendev.org/c/openstack/skyline-apiserver/+/901229

Closes-Bug: #2049719
Change-Id: Icd7dbd5128dc8f4eb83a09d3304726ebb96cb074
2024-01-18 15:51:40 +08:00
Arnaud Morin
51a5b4a483 Use service_type instead of service_name
When retrieving endpoints from keystone catalog, it's better to use
service_type rather than service_name because the name can be arbitrary
(some operator use custom names) while the service_type should always be
consistent.

Change-Id: I966f2d9f40b8306ba645363a4967139f44d6adde
Signed-off-by: Arnaud Morin <arnaud.morin@gmail.com>
2023-12-06 23:13:56 +01:00
Boxiang Zhu
55adae48a5 fix: Use system session to handle
Use system session to handle token data and user

Change-Id: I3b0534c4a5097553e3689fcaf7915c4be6df1fe3
2023-11-20 13:50:55 +08:00
Boxiang Zhu
235f7fb286 feat: Add default_project_id
1. add default_project_id into profile to return
2. if user has default_project_id, then we will login into
this project as default.

Change-Id: I147f7866163ae4d102e83f7c28bbf0077f463974
2023-11-17 18:22:54 +08:00
iauhsnaiq
99f557e19c fix: modify database connection way
modify parallelDatabase as Database

Bug: 2042812
Change-Id: I33f282e69e7383a51c3e69b4c8e9273609fb988d
2023-11-10 14:28:56 +08:00
yangshaoxue
1cedd57d6a fix: fix login API error message
the login API does not return an error message

Change-Id: I76be8ca033effe8da98b6e0f5281561b183b6266
2023-11-02 16:02:06 +08:00
yangshaoxue
1e4f72ca2b Add configurable policy files
Configurable policy files are added for services.

Change-Id: I53549fe80798bdd2e6ed3f92f548ed16393a269f
2023-10-31 13:58:22 +08:00
iauhsnaiq
fe56f82f19 support masakari and designate
add masakari and designate policies file and configs.

Change-Id: Ic2d3431df3cb8d33e74d061337514ea3d91bb7ac
2023-10-25 17:23:50 +08:00
resitdemir
a2f32fc234 Updating Target Attributes For Barbican Policy
Barbican policy contains target attributes which need to be updated in request context
like "target.secret.project.id". Otherwise certificate menu throws permission denied errors.
Also we need to set "target.secret.read" and "target.secret.read_project_access"
but i did not find a way how to set them.

Change-Id: I51631d0be023fc091b32aaeb71145c2893454bba
2023-09-28 08:15:10 +00:00
yangshaoxue
87019798fa fix: Compatible with member and _member_
When the default role is _member_ instead of member, the Skyline API response 401

Bug: 2034976
Change-Id: I7c633728c8de9f300eb718f615bc9950e0c96411
2023-09-19 17:28:45 +08:00
Boxiang Zhu
9c4f5e5e74 feat: Add time_expired into cookie
Now the expired time for skyline and keystone is not the same
value. Sometime, when the token of keystone is valid but the
jwt token of skyline-apiserver is invalid.
The skyline-console will send the request to backend service
and then get 401 from skyline.
So we add time_expired into cookie, then skyline-console can
check whether time expired or not.

Change-Id: Id1d3a83eb433c18e88828115e8bd744151fb14f7
2023-06-05 16:40:49 +08:00
Danny Webb
de22d3ba3b change sso port to be optional
request.url.port can return None in the case of default ports (80,443)

Change-Id: I07b5fdf11199afefd2996ff36c6e997e52037308
Signed-off-by: Danny Webb <danny.webb@thehutgroup.com>
2023-04-04 15:27:07 +00:00
yangshaoxue
7f363390c8 fix: prometheus response 500
API /query_range always report 500 error

Bug: 1999839
Change-Id: I66a152c2c76d4984cc2fbf085e8c2d1da3701ece
2022-12-20 11:46:10 +08:00
yangshaoxue
ceabe71b7f feat: Add cafile conf
Add cafile conf and support keystone ssl verify

Change-Id: Id82f49009e2e6778568c629b9fe66e3e50cf73d7
2022-12-15 18:20:49 +08:00
yangshaoxue
c7c346de9a fix: Fix keystone_url default sample
Fixed the issue that keystone_url's default sample was incorrect

Change-Id: I0e5157c1f2cb3a89f3abcd6decc3371116a79835
2022-12-15 15:20:06 +08:00
Tobias Urdin
49259070ad Fix spelling for admin role in Barbican policy
See this patch fixing this [1].

[1] https://review.opendev.org/c/openstack/barbican/+/864226

Change-Id: I9ca2341a0d52d0516f77169783b47e194f16cb00
2022-12-15 01:14:12 +00:00
yangshaoxue
ea69660e4d feat: Add API docs
Update the nginx configuration file to access API docs

Change-Id: I59dc9aee11f87f61d1ecb6095b16bed9658a58c0
2022-11-02 17:31:04 +08:00
Boxiang Zhu
1393aea120 feat: Support both http and https for nginx.conf.j2 template
By default, if we do not supply the ssl_certfile and ssl_keyfile,
nginx will use http.

Change-Id: Iba86cd119e1aeec892c2b663c994778b63767e3e
2022-10-21 14:59:23 +08:00
Boxiang Zhu
fb1d6d8d4b feat: Add log_file config into skyline.yaml.sample
Add log_file config. Now log path of skyline is log_dir
with log_file, no other hardcode path.

Change-Id: Ieb1fd567e02110238568840fe3641770def0994d
2022-10-19 17:29:14 +08:00
Boxiang Zhu
68e1a3cced fix: Update policy
Latest policy update for Zed RC2

manila:
  - https://review.opendev.org/c/openstack/manila/+/856394

Change-Id: I6d0c81354ca6b46d1e71bd0a7e44b9e8ab9cf094
2022-09-30 10:24:46 +08:00
Zuul
fb2ea5ebf2 Merge "fix: Add enforce_new_defaults configuration" 2022-09-19 08:58:42 +00:00
yangsngshaoxue
18b61a1089 fix: Add enforce_new_defaults configuration
Fix barbican policy error

Change-Id: I57ebd29906378a67b5d6fe46ae2c584e0abc2a75
2022-09-16 18:15:29 +08:00
Boxiang Zhu
c6fd1d4147 fix: Lack of Octavia device owner of port
Add Octavia device owner of port

Closes-Bug: #1989551
Change-Id: Ic1d544bd9e61f68549cb052c40c666d6306524ef
2022-09-14 15:53:23 +08:00
Boxiang Zhu
c8e191b457 fix: Update policy
Latest policy update for Zed release(1.0.0).

Now no feature for openstack service.

nova:
  - https://review.opendev.org/c/openstack/nova/+/849209
ironic:
  - https://review.opendev.org/c/openstack/ironic/+/852794
glance:
  - https://review.opendev.org/c/openstack/glance/+/855435
barbican:
  - https://review.opendev.org/c/openstack/barbican/+/854656
  - https://review.opendev.org/c/openstack/barbican/+/854661
  - https://review.opendev.org/c/openstack/barbican/+/854655
  - https://review.opendev.org/c/openstack/barbican/+/854677
  - https://review.opendev.org/c/openstack/barbican/+/854786
manila:
  - https://review.opendev.org/c/openstack/manila/+/825008

Change-Id: I5d5940a0c15672aee4a0b4cdacab4460e69511a3
2022-09-13 09:55:04 +08:00
Boxiang Zhu
def775692d fix: Fix to add compute:kuryr for device_owner filter
Fix to add compute:kuryr for device_owner filter

Closes-Bug: #1988946
Change-Id: I109560a8e2b9584c654dfa47fa6dc11a9eee2072
2022-09-07 15:54:28 +08:00
Zuul
00af398d92 Merge "fix: Fix server_name is null in volumes attachment" 2022-08-26 11:51:11 +00:00
Zuul
1730bc5129 Merge "fix: Add enable field in profile" 2022-08-26 07:16:09 +00:00
Boxiang Zhu
71473abbdc fix: Fix server_name is null in volumes attachment
Fix server_name is null in volumes attachment when volume
is attached to server(s).

Change-Id: I69132a2de6c1974e3c081b7cfff0f29b126837bc
2022-08-26 13:42:32 +08:00
yangsngshaoxue
85da8bd976 fix: Add enable field in profile
Add enable field in profile

Change-Id: I1b7b314d49dcd08e8b01be090a7d5206c2f83d4f
2022-08-26 13:14:00 +08:00
Boxiang Zhu
3ccfeefb6c chore: Add description for api params
Add description for api params.

Change-Id: I2f245f52a610dfeb20e8973bcf2b3dec7e000fb8
2022-08-25 17:41:06 +08:00
Boxiang Zhu
f3dacbcea7 chore: Add license for python file and update policy
1. Add license for python file
2. Update the policy for all services

Change-Id: I4bc6a68874afe1cc51da1a24d278165356d5dec3
2022-08-25 14:35:55 +08:00
Zuul
f097842c86 Merge "fix: Check project_id when supply uuid filter" 2022-08-24 12:06:21 +00:00
Zuul
e7809a0002 Merge "refactor: Move all wrapper into wrapper folder" 2022-08-24 11:23:57 +00:00
Zuul
eee3fe81dc Merge "fix: Set bool as string for bootable and multiattach" 2022-08-24 11:23:55 +00:00
Boxiang Zhu
fefc145642 fix: Check project_id when supply uuid filter
Check project_id when supply uuid filter for volume snapshots list.
If project_id is not the same as login project_id when not supply
all_projects, just return None.

Change-Id: Idba709fe5d85087129144aa6bbbfe811fc36359f
2022-08-24 18:30:01 +08:00
Boxiang Zhu
74b29b8c5c refactor: Move all wrapper into wrapper folder
Move all wrapper into wrapper folder

Change-Id: I3f809a15bebdd3284a07acfde4dc887efc0fe36e
2022-08-24 11:54:11 +08:00
Boxiang Zhu
3641286cd5 fix: Set bool as string for bootable and multiattach
Set bool as string for bootable and multiattach query
params.
The cinder client only accept truth value for api as
query params.

Change-Id: Id26a0233c2ffc2d4165e96cab37c62c77fbefb24
2022-08-24 11:21:20 +08:00
yangsngshaoxue
8fadde52bf fix: Fix empty projects in profile
Fix empty projects in profile when using sso login

Change-Id: I2296cc88f04e3a3eeb2c51d8e83335923e0e5353
2022-08-24 10:57:16 +08:00
Boxiang Zhu
40b30101c3 feat: Return both id and name of children volume for snapshots
Return both id and name of children volume for snapshots

Change-Id: I194e13a368d01178b5e4751a42f8f3e6d0faa4f1
2022-08-23 16:41:37 +08:00
Boxiang Zhu
22ea97f536 refactor: Remove invalid codes for volumes and snapshots
The patch: https://review.opendev.org/c/openstack/python-cinderclient/+/767451
has been merged. And it has been released in Xena branch.

So We change the requirements.txt of the python-cinderclient
version as 8.1.0.

Change-Id: Ibf0ddb4c3ea532fdc1bffab210671bf63c128b02
2022-08-23 16:03:38 +08:00
Boxiang Zhu
aa77306945 fix: Fix member use has no snapshot_id filter for volumes
We use system session to filter volumes with snapshot_id.
The snapshot_id filter is non-available for member user.

Change-Id: I6424f117d28378a8eb1dcafa02e6c50029f62015
2022-08-23 15:06:08 +08:00
Boxiang Zhu
7f0a0818f7 feat: Support uuid filter for volume snapshots list
Support uuid filter for volume snapshots list API.

Change-Id: I916fdca140a05f70d8f558e24c92eb2221246ea7
2022-08-23 14:54:36 +08:00
Boxiang Zhu
4b8fed8f63 fix: Fix server_name is null for ports list api
1. Fix server_name is null for ports list api
2. Add more detailed description of params
3. Update swagger.json file

Change-Id: I3f4601235585db3896e7b1d25176b33ff59caf57
2022-08-18 16:20:38 +08:00
Boxiang Zhu
54e67e606c fix: Catch InternalServerError
We need to catch InternalServerError and then LOG. Just
use user_context.

Change-Id: Iaf4aa2d9c7935735bab600aa892f5d90b5800012
2022-08-18 14:49:20 +08:00
Boxiang Zhu
3dd6cb89fc fix: Fix the limit for ports list
We need set retrieve_all as False when we
use neutron client SDK. Default value is True,
it will retrieve all data.

Change-Id: I4e0222c28038fb1b769667951607376adbae284a
2022-08-17 14:57:10 +08:00