You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add [meta check] command and fallback for help command, add resolve_domain function with default_dns_resolve_timeout in Preference, support serialize for manage=False django models (such as database view), remove base_url private restriction for OperationsAPI, add error handling for field rule generation, optimize @service.mount decorator
Copy file name to clipboardExpand all lines: docs/en/community/release.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,27 @@
1
1
# Release Note
2
2
3
+
## v2.7.5
4
+
5
+
Release Date: 2025/3/21
6
+
7
+
### New features
8
+
9
+
* ·Operations support `connection_key` to authorize the local and private services, and support connecting to private service directly after `connection_key` and `private_scope` are set.
10
+
* Add `meta check` command to check if UtilMeta can load normally (no error)
11
+
12
+
### Optimized
13
+
14
+
* Optimized `orm.Field` to support lookup that has conflicted name with field name.
15
+
* Optimized runtime dispatch for all Adaptors (request, response, file, ...) with `__backends_package__` specified.
16
+
* Optimized ResponseFile's file name recognition.
17
+
* Optimized Session's `save` for database drivin session.
18
+
* Optimized Filter's `query` to handle `@classmethod`.
19
+
* orm support query and serialize `managed=False` Django model (such as the database view model without primary key)
20
+
21
+
### Fixed
22
+
23
+
* Fix Django route mounting problem (`__as__` method)
Copy file name to clipboardExpand all lines: docs/en/guide/ops.md
+57-3Lines changed: 57 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,7 +233,7 @@ The additional specified OpenAPI document will be integrated with the automatica
233
233
## Connect to UtilMeta Platform
234
234
235
235
UtilMeta provides a platform for the observation and management operations of the API services: [UtilMeta Platform ](https://ops.utilmeta.com) you can enter the platform to connect and manage your UtilMeta service (or other services with supported frameworks), view API documents, data, logs and monitoring.
236
-
### Connect Local Node
236
+
### Connect Local API
237
237
238
238
If you have configured the Operations successfully and run the local service, you can see the following prompt
239
239
@@ -253,7 +253,7 @@ meta connect
253
253
You can see that the browser opened a window of UtilMeta platform, where you can see the APIs, Data tables, log and monitoring of your service.
Connecting to the API service deployed online with public network address requires you to register an account on the UtilMeta platform. Because the management of online services requires a stricter authorization and authentication mechanism, you need to create a project team on the UtilMeta platform first. When you enter an empty project team, You can see the connection prompt for the UtilMeta platform
259
259
@@ -269,7 +269,7 @@ please visit [URL] to view and manage your APIs'
269
269
270
270
Click the URL to access the online service you have connected in UtilMeta Platform, or click the **I’ve executed successfully** button in the platform to refresh after successful execution
271
271
272
-
### Connect Intranet Cluster
272
+
### Connect Intranet Cluster (by proxy)
273
273
274
274
In addition to manage API services on the public network, we sometimes need to manage API services in private network clusters, such as internal services within the company's intranet, which do not have public IP addresses or access URLs. To manage these internal network services, we need to set up public network proxies in the internal network cluster, deploy a proxy service node for internal network penetration with authentication and service registration.
275
275
@@ -316,6 +316,60 @@ service.use(Operations(
316
316
!!! note
317
317
UtilMeta services in the cluster should share the same Operations database as the proxy service, this database will serve as the service authentication basis and management storage center in the cluster. Current version mainly support PostgreSQL and MySQL as operations storage, futher releases will support other storage vendors.
318
318
319
+
### Connect Private Service (directly)
320
+
321
+
Beside the proxy mode in the above section, UtilMeta also provided a method to connect service node in the private network directly, similiar to connecting local API, with two conditions required:
322
+
323
+
* Your management client (the computer that opened the UtilMeta Platform) must located at the **same private network** with the service you are going to manage. which means your computer can directly access the private service's API.
324
+
* Your private service should provide HTTPS access (with SSL certificates)
325
+
326
+
!!! note
327
+
In the site that served with HTTPS (i.e. UtilMeta platform), browser will block all http requests (except for localhost), as you can see in the [Mixed Content | MDN](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content), so to connect to the private service directly, you should use the HTTPS protocol
328
+
329
+
After meeting the above conditions, you need to add two additional configurations for Operations:
330
+
331
+
*`connection_key`: In order to ensure the security of private network nodes, directly connecting to private network nodes requires you to pre-set a key (preferably a long random string) in the Operations configuration. UtilMeta will first verify this key for management requests from the private network, and only execute the corresponding request after verification is successful.
332
+
*`private_scope`: Authorize the permission range for private network requests. The value of the permission range can refer to the introduction in the `'local_scope'` section above. If you need to grant all permissions, you can use `['*']`
333
+
334
+
The configuration example is as follows:
335
+
```python
336
+
from config.env import env
337
+
from utilmeta.ops import Operations
338
+
339
+
service.use(Operations(
340
+
base_url='https://my-private-service.com/api', # replace with your domain
341
+
# other settings...
342
+
connection_key=env.CONNECTION_KEY,
343
+
private_scope=['*']
344
+
))
345
+
```
346
+
347
+
Noted that `base_url` should also need to set to the address with HTTPS protocol and domain name.
348
+
349
+
!!! note
350
+
Connect to private network service directly requres UtilMeta >= 2.7.5
351
+
352
+
After the configuration, restart your service and you will see the OperationsAPI URL in the output
353
+
354
+
```
355
+
UtilMeta OperationsAPI loaded at https://my-private-service.com/api/ops
356
+
```
357
+
358
+
Then we can login to [UtilMeta Platform](https://ops.utilmeta.com), enter your project team, click the **\[Connect Local API\]** of **\[+\]** button on the top bar
If you connected successfully, UtilMeta platform will prompt you to enter the `connection_key` you configured in the service, enter the correct key then you will be connected to your private service directly
With "Save the key" checked, you can save the `connection_key` and OperationsAPI address of the private service to your project team, you won't need to enter these info again to connect to this service next time.
372
+
319
373
## Connect to Python project
320
374
321
375
The operations system of UtilMeta framework can not only connect to the services made by UtilMeta framework, but also connect to the existing Python backend projects. The currently supported frameworks include
UtilMeta OperationsAPI loaded at https://my-private-service.com/api/ops, connect your APIs at https://ops.utilmeta.com/localhost?local_node=https://my-private-service.com/api/ops
360
+
UtilMeta OperationsAPI loaded at https://my-private-service.com/api/ops
0 commit comments