Commit 6e41897
authored
feat(policies): add allowedProviders field for dynamic policies (#39)
* feat(policies): add allowedProviders field for dynamic policies
Add allowedProviders field to dynamic policy types for GDPR, HIPAA, and RBI
compliance. This enables restricting LLM routing to specific providers when
a dynamic policy matches.
- Add allowedProviders to DynamicPolicy, CreateDynamicPolicyRequest,
UpdateDynamicPolicyRequest
- Add Builder.allowedProviders() methods with Javadoc
- Update CHANGELOG for v2.1.0
* fix: use action.config for allowed_providers instead of top-level field
- Removed allowedProviders from DynamicPolicy, CreateDynamicPolicyRequest, UpdateDynamicPolicyRequest
- Added category field to DynamicPolicy and request types
- Added Javadoc documentation showing correct usage via action config
- Backend stores allowed_providers in action.config, not as top-level field
* fix: correct dynamic policy response parsing for wrapped API responses
Agent proxy (Issue #886) returns wrapped responses:
- List endpoints return {"policies": [...]}
- Single policy endpoints return {"policy": {...}}
Added wrapper types:
- DynamicPoliciesResponse
- DynamicPolicyResponse
Fixed methods:
- listDynamicPolicies
- getDynamicPolicy
- createDynamicPolicy
- updateDynamicPolicy
- toggleDynamicPolicy
- getEffectiveDynamicPolicies
* fix: add X-Tenant-ID header to orchestrator requests
- Add addTenantIdHeader() call to buildOrchestratorRequest() method
- Ensures tenant identification works in community/self-hosted mode
- Fixes 'Missing tenant ID' error for dynamic policy API calls
* test: update dynamic policy tests for wrapped API responses
Agent proxy (Issue #886) returns wrapped responses:
- List endpoints: {"policies": [...]}
- Single item endpoints: {"policy": {...}}
Updated test stubs to return wrapped responses.
* chore: bump version to 2.1.0
* fix: add sensitive-data category to PolicyCategory enum
- Added SENSITIVE_DATA for policies returning 'sensitive-data' category
- Fixes getEffectiveStaticPolicies validation errors
* fix: use PUT instead of PATCH for toggleDynamicPolicy
The server's dynamic policy update endpoint uses PUT, not PATCH.
This fixes HTTP 405 errors when toggling policy enabled state.
* fix: update toggleDynamicPolicy test to use PUT instead of PATCH
docs: add toggleDynamicPolicy HTTP method fix to changelog1 parent 224043b commit 6e41897
5 files changed
Lines changed: 136 additions & 17 deletions
File tree
- src
- main/java/com/getaxonflow/sdk
- types/policies
- test/java/com/getaxonflow/sdk
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
8 | 30 | | |
9 | 31 | | |
10 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1226 | 1226 | | |
1227 | 1227 | | |
1228 | 1228 | | |
1229 | | - | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1230 | 1232 | | |
1231 | 1233 | | |
1232 | 1234 | | |
| |||
1243 | 1245 | | |
1244 | 1246 | | |
1245 | 1247 | | |
1246 | | - | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
1247 | 1251 | | |
1248 | 1252 | | |
1249 | 1253 | | |
| |||
1260 | 1264 | | |
1261 | 1265 | | |
1262 | 1266 | | |
1263 | | - | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1264 | 1270 | | |
1265 | 1271 | | |
1266 | 1272 | | |
| |||
1279 | 1285 | | |
1280 | 1286 | | |
1281 | 1287 | | |
1282 | | - | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
1283 | 1291 | | |
1284 | 1292 | | |
1285 | 1293 | | |
| |||
1315 | 1323 | | |
1316 | 1324 | | |
1317 | 1325 | | |
1318 | | - | |
| 1326 | + | |
1319 | 1327 | | |
1320 | | - | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
1321 | 1331 | | |
1322 | 1332 | | |
1323 | 1333 | | |
| |||
1348 | 1358 | | |
1349 | 1359 | | |
1350 | 1360 | | |
1351 | | - | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
1352 | 1364 | | |
1353 | 1365 | | |
1354 | 1366 | | |
| |||
2181 | 2193 | | |
2182 | 2194 | | |
2183 | 2195 | | |
| 2196 | + | |
2184 | 2197 | | |
2185 | 2198 | | |
2186 | 2199 | | |
| |||
Lines changed: 76 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
613 | 616 | | |
614 | 617 | | |
615 | 618 | | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
616 | 626 | | |
617 | 627 | | |
618 | 628 | | |
619 | 629 | | |
620 | 630 | | |
621 | 631 | | |
| 632 | + | |
622 | 633 | | |
623 | 634 | | |
624 | 635 | | |
| |||
637 | 648 | | |
638 | 649 | | |
639 | 650 | | |
| 651 | + | |
| 652 | + | |
640 | 653 | | |
641 | 654 | | |
642 | 655 | | |
| |||
727 | 740 | | |
728 | 741 | | |
729 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
730 | 750 | | |
731 | 751 | | |
732 | 752 | | |
733 | 753 | | |
734 | 754 | | |
| 755 | + | |
735 | 756 | | |
736 | 757 | | |
737 | 758 | | |
| |||
744 | 765 | | |
745 | 766 | | |
746 | 767 | | |
| 768 | + | |
747 | 769 | | |
748 | 770 | | |
749 | 771 | | |
| |||
773 | 795 | | |
774 | 796 | | |
775 | 797 | | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
776 | 810 | | |
777 | 811 | | |
778 | 812 | | |
| |||
801 | 835 | | |
802 | 836 | | |
803 | 837 | | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
804 | 845 | | |
805 | 846 | | |
806 | 847 | | |
807 | 848 | | |
808 | 849 | | |
| 850 | + | |
809 | 851 | | |
810 | 852 | | |
811 | 853 | | |
| |||
818 | 860 | | |
819 | 861 | | |
820 | 862 | | |
| 863 | + | |
821 | 864 | | |
822 | 865 | | |
823 | 866 | | |
| |||
841 | 884 | | |
842 | 885 | | |
843 | 886 | | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
844 | 898 | | |
845 | 899 | | |
846 | 900 | | |
| |||
1019 | 1073 | | |
1020 | 1074 | | |
1021 | 1075 | | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1022 | 1098 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
400 | 401 | | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
404 | | - | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
| |||
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
| 417 | + | |
416 | 418 | | |
417 | 419 | | |
418 | 420 | | |
419 | 421 | | |
420 | 422 | | |
421 | 423 | | |
422 | | - | |
| 424 | + | |
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
| |||
435 | 437 | | |
436 | 438 | | |
437 | 439 | | |
| 440 | + | |
438 | 441 | | |
439 | 442 | | |
440 | 443 | | |
441 | 444 | | |
442 | | - | |
| 445 | + | |
443 | 446 | | |
444 | 447 | | |
445 | 448 | | |
| |||
457 | 460 | | |
458 | 461 | | |
459 | 462 | | |
| 463 | + | |
460 | 464 | | |
461 | 465 | | |
462 | 466 | | |
463 | 467 | | |
464 | | - | |
| 468 | + | |
465 | 469 | | |
466 | 470 | | |
467 | 471 | | |
| |||
488 | 492 | | |
489 | 493 | | |
490 | 494 | | |
| 495 | + | |
491 | 496 | | |
492 | 497 | | |
493 | 498 | | |
494 | 499 | | |
495 | | - | |
| 500 | + | |
496 | 501 | | |
497 | 502 | | |
498 | 503 | | |
| |||
527 | 532 | | |
528 | 533 | | |
529 | 534 | | |
| 535 | + | |
| 536 | + | |
530 | 537 | | |
531 | | - | |
| 538 | + | |
532 | 539 | | |
533 | 540 | | |
534 | 541 | | |
535 | | - | |
| 542 | + | |
536 | 543 | | |
537 | 544 | | |
538 | 545 | | |
539 | 546 | | |
540 | 547 | | |
541 | | - | |
| 548 | + | |
542 | 549 | | |
543 | 550 | | |
544 | 551 | | |
545 | 552 | | |
546 | 553 | | |
547 | 554 | | |
| 555 | + | |
548 | 556 | | |
549 | 557 | | |
550 | 558 | | |
551 | 559 | | |
552 | | - | |
| 560 | + | |
553 | 561 | | |
554 | 562 | | |
555 | 563 | | |
| |||
0 commit comments