Posted 51CTO鎶€鏈爤
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了相关的知识,希望对你有一定的参考价值。
閫?绂?鍒?鍟?/strong>
鍏虫敞HarmonyOS鎶€鏈ぞ鍖?/strong>锛屽洖澶?/span>銆愰缚钂欍€?/span>閫?/span>浠峰€?/span>399鍏?/strong>鐨勯缚钂?/span>寮€鍙戞澘濂椾欢锛堝嵆灏嗗紑濂栵紝璧跺揩鍙備笌鍝︼紒锛?/span>锛岃繕鍙互鍏嶈垂涓嬭浇楦胯挋鍏ラ棬璧勬枡锛?br class="mq-49">
馃憞鎵爜绔嬪埢鍏虫敞馃憞
涓撴敞寮€婧愭妧鏈紝鍏卞缓楦胯挋鐢熸€?/span>
鏈€杩戠湅鍒颁簡涓€绡?API 缃戝叧鐨勬枃绔狅紝浠嬬粛浜嗗叾涓夌瑙掕壊锛欰PI 绠$悊銆侀泦缇ゅ叆鍙f帶鍒躲€丄PI 缃戝叧妯″紡锛屾渶鍚庤繕璁蹭簡涓庢湇鍔$綉鏍肩殑鍏崇郴锛岄€氳繃姝ゆ枃鍙互鏇村叏闈㈢殑鐞嗚В API 缃戝叧鐨勪綔鐢ㄣ€?/span>
杩欎簺骞存潵锛孉PI 缃戝叧姝e湪缁忓巻涓€浜涙湁鍏充粬浠槸鍚︾湡鐨勮捣鍒颁綔鐢ㄧ殑璐ㄧ枒锛?/span>
瀹冧滑鏄惁闆嗕腑銆佸叡浜簡璧勬簮锛屼粠鑰屼績杩涗簡 API 瀵逛簬澶栭儴璋冪敤鐨勭鐞嗭紵
瀹冧滑鏄惁闆嗙兢鍏ュ彛锛坕ngress锛夌殑鎺у埗鍣紝浠庤€屽彲浠ヤ弗鏍肩鐞嗙敤鎴疯繘鍏ユ垨绂诲紑闆嗙兢鍚楋紵
鎴栬€呭畠浠槸鍚︽煇绉?API 鐨勯摼鎺ュ櫒锛屼粠鑰岃 API 鍦ㄦ寚瀹氱殑瀹㈡埛绔笂鏇存柟渚夸娇鐢紵
褰撶劧锛屾埧闂撮噷鐨勫ぇ璞″拰鏈€甯歌鐨勯棶棰樻槸锛氣€滄湇鍔$綉鏍间細浣?API 缃戝叧杩囨椂鍚楋紵
鎴块棿閲岀殑澶ц薄锛?/span>鑻辫涔犺锛屾寚鐨勬槸涓€浜涜櫧鐒舵樉鑰屾槗瑙侊紝浣嗗嵈鐢变簬鍙兘閫犳垚灏村艾銆佷簤鎵с€佽Е鍙婃晱鎰熸垨绂佸繉绛夊師鍥犺浜哄埢鎰忓拷瑙嗙殑浜嬫儏銆?br>
涓€浜涜儗鏅?/p>
闅忕潃鎶€鏈彂灞曟棩鏂版湀寮傦紝鏁翠釜琛屼笟閫氳繃鎶€鏈拰鏋舵瀯妯″紡鐨勬帹闄堝嚭鏂拌繘琛屽揩閫熸礂鐗岋紝濡傛灉浣犺鈥滄墍鏈夎繖浜涢兘浣挎垜澶村ぇ鈥濓紝涔熷彲浠ョ悊瑙c€?br>
鍦ㄦ湰鏂囦腑锛屾垜甯屾湜鎬荤粨鍑衡€淎PI 缃戝叧鈥濈殑涓嶅悓韬唤锛岄槓鏄庢棩甯镐娇鐢ㄤ腑锛屽摢浜涚兢浣撳彲浠ヤ娇鐢?API 缃戝叧锛堟垨璁镐竴閮ㄤ汉姝g鍒板苟鍦ㄥ皾璇曡В鍐宠繖涓棶棰橈級锛屽苟鍐嶆寮鸿皟閭d簺鍩烘湰鍘熷垯銆?br>
鐞嗘兂鎯呭喌涓嬶紝鍦ㄦ湰鏂囩粨鏉熸椂锛屾偍灏嗘洿濂藉湴浜嗚В API 鍩虹鏋舵瀯鍦ㄤ笉鍚屽眰绾с€佸涓嶅悓瀵硅薄鐨勪綔鐢紝鍚屾椂鏄庣櫧濡備綍浠庢瘡涓眰绾ц幏寰楁渶澶т环鍊笺€?br>
鍦ㄦ繁鍏ユ帰璁ㄤ箣鍓嶏紝璁╂垜浠厛鏄庣‘ API 涓€璇嶇殑鍚箟銆?br>
鎴戝 API 鐨勫畾涔夛細涓€涓湁鐫€鏄庣‘瀹氫箟骞朵笖鏈€缁堢洰鐨勬竻鏅扮殑鎺ュ彛锛岄€氳繃缃戠粶璋冪敤锛屼娇杞欢寮€鍙戜汉鍛樿兘澶熸柟渚垮畨鍏ㄧ殑瀵圭洰鏍囨暟鎹拰鍔熻兘杩涜绋嬪簭璁块棶銆?/span>
杩欎簺鎺ュ彛鎶借薄浜嗗疄鐜板畠浠殑鎶€鏈灦鏋勭粏鑺傘€傚浜庤繖浜涜璁″ソ浜嗙殑缃戠粶鑺傜偣锛屾垜浠笇鏈涜幏寰椾竴瀹氱▼搴︾殑浣跨敤鎸囧紩銆佷互鍙婃垚鐔熺殑鍚戜笅鍏煎鎬с€?br>
鐩稿弽锛屽鏋滀粎浠呮槸鍙互閫氳繃缃戠粶涓庡彟涓€杞欢杩涜浜や簰锛屽苟涓嶄竴瀹氭剰鍛崇潃閭d簺杩滅▼鑺傜偣灏辨槸绗﹀悎姝ゅ畾涔夌殑 API銆?br>
璁稿绯荤粺鐩镐簰浜や簰锛屼絾鏄繖浜涗氦浜掓瘮杈冮殢鎰忥紝骞朵笖鍥犱负绯荤粺涔嬮棿鑰﹀悎鎬у拰鍏朵粬涓€浜涘洜绱犵殑鍏崇郴锛屽線寰€鍦ㄥ嵆鏃舵€ф柟闈細鍙楀埌褰卞搷銆?br>
鎴戜滑鍒涘缓 API 鏉ヤ负涓氬姟鐨勫悇涓儴鍒嗘彁渚涘畬鍠勭殑鎶借薄鏈嶅姟锛屼互瀹炵幇鏂扮殑涓氬姟鍔熻兘浠ュ強鍋剁劧鍙戠幇涓€涓や釜鍒涙柊涔嬩妇銆?br>
鍦ㄨ皥璁?API 缃戝叧鏃讹紝棣栧厛瑕佹彁鍒扮殑鏄?API 绠$悊銆?br>
API 绠$悊
璁稿浜轰粠 API 绠$悊鐨勮搴﹁€冭檻 API 缃戝叧銆傝繖鏄悎鐞嗙殑銆備絾鏄紝璁╂垜浠厛蹇€熺湅涓€涓嬫绫荤綉鍏崇殑鍔熻兘銆?br>
閫氳繃 API 绠$悊锛屾垜浠皾璇曞幓瑙e喅鈥滃浣曟帶鍒剁粰鍏朵粬浜轰娇鐢ㄥ綋鍓嶆湁鐨?API鈥濈殑闂銆?br>
渚嬪锛屽浣曡窡韪皝鍦ㄤ娇鐢ㄨ繖浜?API銆佸璋佽兘浣跨敤杩欎簺 API 杩涜鏉冮檺鎺у埗銆佸缓绔嬩竴濂楀畬鍠勭殑绠$悊鎺柦杩涜浣跨敤鎺堟潈鍜岃璇侊紝鍚屾椂鍒涘缓涓€涓湇鍔$洰褰曪紝鍙互鍦ㄨ璁℃椂浣跨敤锛屾彁鍗囧 API 鐨勭悊瑙e苟涓轰互鍚庣殑鏈夋晥娌荤悊濂犲畾鍩虹銆?br>
鎴戜滑鎯宠В鍐斥€滄垜浠湁涓€浜涗紭绉€鐨?API锛屽苟涓旀垜浠笇鏈涘埆浜烘潵浣跨敤杩欎簺 API锛屼絾鏄笇鏈涗粬浠寜鐓ф垜浠殑瑙勫垯鍘讳娇鐢ㄢ€濈殑闂銆?br>
API 绠$悊褰撶劧涔熻捣鍒颁竴浜涘緢濂界殑鐢ㄥ锛屼緥濡傦紝瀹冨厑璁哥敤鎴凤紙娼滃湪鐨?API 浣跨敤鑰咃級杩涜鑷姪鏈嶅姟锛岀缃蹭笉鍚岀殑 API 浣跨敤璁″垝锛堣鑰冭檻锛氬湪缁欏畾鏃堕棿鑼冨洿鍐咃紝鍦ㄦ寚瀹氫环鏍肩偣涓婏紝姣忎釜绔偣姣忎釜鐢ㄦ埛鐨勮皟鐢ㄦ鏁帮級銆?br>
API Management Gateway
鍩轰簬 API 缃戝叧鐨?API 绠$悊杞欢绀轰緥锛?/span>
Google Cloud Apigee
Red Hat 3Scale
Mulesoft
Kong
鍦ㄨ繖涓眰绾э紝鎴戜滑鑰冭檻鐨勬槸 API锛堝涓婂畾涔夛級鏄浣曟渶濂藉湴绠$悊鍜屽厑璁稿鍏惰繘琛岃闂€?br>
鎴戜滑娌℃湁鑰冭檻鍏朵粬瑙掑害锛屼緥濡傛湇鍔″櫒銆佷富鏈恒€佺鍙c€佸鍣ㄧ敋鑷虫湇鍔★紙杩欐槸鍙︿竴涓緢闅惧畾涔夋竻妤氱殑璇嶏級銆?br>
API 绠$悊锛堜互鍙婂畠浠浉搴旂殑缃戝叧锛夛紝閫氬父浼氳涓ユ牸鎶婃帶锛屽苟浣滀负涓€绉嶁€滃钩鍙扮粍浠垛€濄€佲€滀竴浣撳寲缁勪欢鈥濆拰 API 鐨勫叾浠栧熀纭€缁勪欢涓€璧风敓鏁堛€?br>
闇€瑕佹敞鎰忕殑涓€浠朵簨锛?/span>鎴戜滑瑕佸皬蹇冨崈涓囧埆璁╀换浣曚笟鍔¢€昏緫杩涘叆杩欎竴灞傘€?br>
濡傚墠涓€娈垫墍杩帮紝API 绠$悊鏄叡浜殑鍩虹鏋舵瀯锛屼絾鏄敱浜庢垜浠殑 API 娴侀噺缁忚繃浜嗗畠锛屽洜姝ゅ畠鍊惧悜浜庨噸鏂板垱寤衡€滃ぇ鍖呭ぇ鎻界殑鍏ㄨ兘鍨嬧€濓紙璁や负鏄紒涓氭湇鍔℃€荤嚎锛夌綉鍏筹紝杩欎細瀵艰嚧鎴戜滑蹇呴』涓庝箣鍗忚皟鏉ユ洿鏀规垜浠殑鏈嶅姟銆?br>
浠庣悊璁轰笂璁诧紝杩欏惉璧锋潵涓嶉敊銆傚疄闄呬笂锛岃繖鏈€缁堝彲鑳芥垚涓虹粍缁囩殑鐡堕銆?br>
鏈夊叧鏇村淇℃伅锛岃鍙傝杩欑瘒鏂囩珷锛氬叿鏈?ESB锛孉PI 绠$悊鍜?Now鈥ervice Mesh 鐨勫簲鐢ㄧ▼搴忕綉缁滃姛鑳斤紵
https://blog.christianposta.com/microservices/application-network-functions-with-esbs-api-management-and-now-service-mesh/
闆嗙兢鍏ュ彛
涓轰簡鏋勫缓鍜屽疄鐜?API锛屾垜浠皢閲嶇偣鏀惧湪浠g爜銆佹暟鎹€佺敓浜у姏妗嗘灦绛夋柟闈€?br>
浣嗘槸锛岃鎯充娇杩欎簺浜嬫儏涓殑浠讳綍涓€涓骇鐢熶环鍊硷紝灏卞繀椤诲鍏惰繘琛屾祴璇曪紝閮ㄧ讲鍒扮敓浜т腑骞惰繘琛岀洃鎺с€?br>
褰撴垜浠紑濮嬮儴缃插埌浜戝钩鍙版椂锛屾垜浠紑濮嬭€冭檻閮ㄧ讲銆佸鍣ㄣ€佹湇鍔°€佷富鏈恒€佺鍙g瓑锛屽苟鏋勫缓鍙湪姝ょ幆澧冧腑杩愯鐨勫簲鐢ㄧ▼搴忋€?br>
鎴戜滑鍙兘姝e湪璁捐宸ヤ綔娴侊紙CI锛夊拰绠¢亾锛圕D锛夛紝浠ュ埄鐢ㄤ簯骞冲彴蹇€熻縼绉汇€佹洿鏀圭殑鐗圭偣锛屽皢鍏跺揩閫熷睍绀哄湪瀹㈡埛闈㈠墠绛夌瓑銆?br>
鍦ㄨ繖绉嶇幆澧冧腑锛屾垜浠彲鑳戒細鏋勫缓鍜岀淮鎶ゅ涓泦缇ゆ潵鎵胯浇鎴戜滑鐨勫簲鐢ㄧ▼搴忥紝骞朵笖闇€瑕佹煇绉嶆柟寮忕洿鎺ユ潵璁块棶杩欎簺闆嗙兢涓殑搴旂敤绋嬪簭鍜屾湇鍔°€?br>
浠?Kubernetes 涓轰緥鎬濊€冦€傛垜浠彲鑳戒細閫氳繃涓€涓?Kubernetes 鍏ュ彛鎺у埗鍣ㄦ潵璁块棶 Kubernetes 闆嗙兢锛堥泦缇や腑鐨勫叾瀹冩墍鏈夊唴瀹归兘鏃犳硶浠庡閮ㄨ闂級銆?br>
杩欐牱锛屾垜浠氨鍙互閫氳繃瀹氫箟鏄庣‘鐨勮鍒欙紙渚嬪鍩?铏氭嫙涓绘満銆佺鍙c€佸崗璁瓑锛夛紝涓ユ牸鎺у埗鍝簺鍐呭鍙互杩涘叆锛堢敋鑷崇寮€锛夋垜浠殑闆嗙兢銆?br>
鍦ㄨ繖涓眰绾э紝鎴戜滑鍙兘甯屾湜鏌愮鈥滃叆鍙g綉鍏斥€濇垚涓哄厑璁歌姹傚拰娑堟伅杩涘叆闆嗙兢鐨勬祦閲忕洃鎺т汉銆?br>
鍦ㄨ繖涓眰绾э紝鎬濊€冩洿澶氱殑鏄€滄垜鐨勯泦缇や腑鏈夋鏈嶅姟锛屾垜闇€瑕侀泦缇ゅ鐨勪汉鑳藉璋冪敤瀹冣€濄€?br>
杩欏彲鑳芥槸鏈嶅姟锛堝叕寮€ API锛夈€佺幇鏈夌殑鏁翠綋缁勪欢銆乬RPC 鏈嶅姟锛岀紦瀛樸€佹秷鎭槦鍒椼€佹暟鎹簱绛夈€?br>
Cluster Ingress Gateway
杩欎簺绫诲瀷鐨勫叆鍙e疄鐜扮殑绀轰緥鍖呮嫭濡備笅锛?br>
Envoy Proxy 鍙婂叾鍩虹涓婄殑椤圭洰鍖呮嫭锛?/span>
Datawire Ambassador
Solo.io Gloo
Heptio Contour
鍩轰簬鍏朵粬鍙嶅悜浠g悊/璐熻浇鍧囪 鍣ㄦ瀯寤虹殑鍏跺畠缁勪欢锛?/span>
HAProxy
OpenShift鈥檚 Router
Traefik
Kong
姝ゅ眰绾х殑闆嗙兢鍏ュ彛鎺у埗鍣ㄧ敱骞冲彴缁勪欢鎿嶄綔锛屼絾鏄紝杩欓儴鍒嗗熀纭€鏋舵瀯閫氬父涓庢洿鍔犲垎甯冨紡銆佽嚜鍔╂湇鍔$殑宸ヤ綔娴佺浉鍏宠仈锛堟濡傛偍瀵逛簯骞冲彴鎵€鏈熸湜鐨勯偅鏍凤級銆?br>
鍙傝 The 鈥淕itOps鈥?workflow as described by the good folks at Weaveworks锛?br>
https://www.weave.works/blog/gitops-operations-by-pull-request
API 缃戝叧妯″紡
鍏充簬鈥?API 缃戝叧鈥濅竴璇嶇殑鍙︿竴绉嶆墿灞曟槸鎴戝湪鍚埌璇ユ湳璇椂閫氬父鎯冲埌鐨勶紝瀹冩槸涓?API 缃戝叧妯″紡鏈€鐩镐技鐨勩€?br>
Chris Richardson 鍦ㄥ叾鈥滃井鏈嶅姟妯″紡鈥濅竴涔︾ 8 绔犲緢濂藉湴浠嬬粛浜嗚繖绉嶇敤娉曘€傜畝鑰岃█涔嬶紝API 缃戝叧妯″紡鏄拡瀵逛笉鍚岀被鍒殑浣跨敤鑰呮潵浼樺寲 API 鐨勪娇鐢ㄣ€?br>
杩欎釜浼樺寲娑夊強涓€涓?API 闂存帴璁块棶銆傛偍鍙兘浼氬惉鍒板彟涓€涓唬琛?API 缃戝叧妯″紡鐨勬湳璇槸鈥滃墠绔殑鍚庣鈥濓紝鍏朵腑鈥滃墠绔€濆彲浠ユ槸瀛楃缁堢锛圲I锛夈€佺Щ鍔ㄥ鎴风銆両oT 瀹㈡埛绔敋鑷冲叾浠栨湇鍔?搴旂敤绋嬪簭寮€鍙戜汉鍛樸€?br>
鍦?API 缃戝叧妯″紡涓紝鎴戜滑鏄庢樉绠€鍖栦簡瀵逛竴缁?API 鐨勮皟鐢紝浠ユā鎷熼拡瀵圭壒瀹氱敤鎴枫€佸鎴风鎴栦娇鐢ㄨ€呯殑鈥滃簲鐢ㄧ▼搴忊€濆唴鑱?API銆?br>
鍥炴兂涓€涓嬶紝褰撴垜浠娇鐢ㄥ井鏈嶅姟鏋勫缓绯荤粺鏃讹紝鈥滃簲鐢ㄧ▼搴忊€濈殑姒傚康灏辨秷澶变簡銆侫PI 缃戝叧妯″紡鏈夊姪浜庢仮澶嶆姒傚康銆?br>
杩欓噷鐨勫叧閿槸 API 缃戝叧锛屼竴鏃﹀疄鐜帮紝瀹冨皢鎴愪负瀹㈡埛绔拰搴旂敤绋嬪簭鐨?API锛屽苟璐熻矗涓庝换浣曞悗绔?API 鍜屽叾浠栧簲鐢ㄧ▼搴忕綉缁滆妭鐐癸紙涓嶆弧瓒充笂杩?API 瀹氫箟鐨勮妭鐐癸級杩涜閫氫俊浜や簰銆?br>
涓庝笂涓€鑺備腑鐨勫叆鍙f帶鍒跺櫒涓嶅悓锛屾 API 缃戝叧鏇存帴杩戝紑鍙戜汉鍛樼殑瑙嗚锛岃€岃緝灏戝叧娉ㄥ摢浜涚鍙f垨鏈嶅姟浼氬叕寮€浠ヤ緵闆嗙兢澶栦娇鐢ㄣ€?br>
姝も€?API 缃戝叧鈥濅篃涓嶅悓浜庢垜浠鐞嗙幇鏈?API 鐨?API 绠$悊瑙嗚銆傛 API 缃戝叧灏嗗鍚庣鐨勮皟鐢ㄨ仛鍚堝湪涓€璧枫€?br>
杩欏彲鑳戒細鍏紑 API锛屼絾涔熷彲鑳戒細娑夊強鍒颁竴浜?API 鎻忚堪杈冨皯鐨勪笢瑗匡紝渚嬪瀵规棫绯荤粺鐨?RPC 璋冪敤锛屼娇鐢ㄤ笉绗﹀悎鈥淩EST鈥濈殑鍗忚鐨勮皟鐢紙濡傞€氳繃 HTTP 浣嗕笉浣跨敤JSON锛夛紝gRPC锛孲OAP锛孏raphQL銆乄ebSockets 鍜屾秷鎭槦鍒椼€?br>
杩欑绫诲瀷鐨勭綉鍏充篃鍙敤鏉ヨ繘琛屾秷鎭骇杞崲銆佸鏉傜殑璺敱銆佺綉缁滃脊鎬?鍥為€€浠ュ強鍝嶅簲鐨勮仛鍚堛€?br>
API Gateway Pattern
姝ょ被 API 缃戝叧鐨勭ず渚嬪寘鎷細
Spring Cloud Gateway
Netflix Zuul
IBM-Strongloop Loopback/Microgateway
涔熷彲浠ヤ娇鐢ㄦ洿閫氱敤鐨勭紪绋嬫垨闆嗘垚璇█/妗嗘灦锛屼緥濡傦細
Apache Camel
Spring Integration
Ballerina.io
Eclipse Vert.x
NodeJS
鐢变簬杩欑绫诲瀷鐨?API 缃戝叧涓庡簲鐢ㄥ拰鏈嶅姟鐨勫紑鍙戠揣瀵嗙浉鍏筹紝鍥犳鎴戜滑甯屾湜寮€鍙戜汉鍛樿兘澶熷弬涓庡府鍔╂寚瀹?API 缃戝叧鍏紑鐨?API锛屼簡瑙f墍娑夊強鐨勪换浣曡仛鍚堥€昏緫浠ュ強鑳藉蹇€熸祴璇曞拰鏇存敼姝?API 鍩虹鏋舵瀯鐨勮兘鍔涖€?br>
鎴戜滑杩樺笇鏈涜繍缁翠汉鍛樻垨宸ョ▼甯堝 API 缃戝叧鐨勫畨鍏ㄦ€с€佸脊鎬у拰鍙瀵熸€ч厤缃湁涓€浜涙兂娉曘€?br>
杩欑灞傜骇鐨勫熀纭€鏋舵瀯杩樺繀椤婚€傚簲涓嶆柇鍙戝睍鐨勩€佹寜闇€鐨勩€佽嚜涓绘湇鍔″紑鍙戜汉鍛樼殑宸ヤ綔娴併€傚彲浠ラ€氳繃鏌ョ湅 GitOps 妯″瀷鑾峰彇鏇村杩欐柟闈俊鎭€?br>
杩涘叆鏈嶅姟缃戞牸锛圫ervice Mesh锛?/p>
鍦ㄤ簯鍩虹鏋舵瀯涓婅繍琛屾湇鍔℃灦鏋勭殑涓€閮ㄥ垎闅剧偣鏄紝濡備綍鍦ㄧ綉缁滀腑鏋勫缓姝g‘绾у埆鐨勫彲瑙傚療鎬у拰鎺у埗銆?br>
鍦ㄨВ鍐虫闂鐨勫厛鍓嶈凯浠d腑锛屾垜浠娇鐢ㄤ簡搴旂敤绋嬪簭搴撳拰涓€浜涗笓涓氱殑寮€鍙戜汉鍛樻不鐞嗘潵瀹炵幇姝ょ洰鐨勩€?br>
浣嗘槸锛屽湪澶ц妯″拰澶氱寮€鍙戣瑷€鐜涓嬶紝鏈嶅姟缃戞牸鎶€鏈殑鍑虹幇鎻愪緵浜嗘洿濂界殑瑙e喅鏂规銆?br>
鏈嶅姟缃戞牸閫氳繃閫忔槑鍦板疄鐜颁负骞冲彴鍙婂叾缁勬垚鏈嶅姟甯︽潵浠ヤ笅鍔熻兘锛?/span>
鏈嶅姟鍒版湇鍔★紙鍗充笢瑗垮悜娴侀噺锛夌殑寮规€с€?/span>
瀹夊叏鎬у寘鎷渶缁堢敤鎴疯韩浠介獙璇併€佺浉浜?TLS銆佹湇鍔″埌鏈嶅姟 RBAC/ABAC銆?/span>
榛戠洅鏈嶅姟鐨勫彲瑙傚療鎬э紙涓撴敞浜庣綉缁滈€氫俊锛夛紝渚嬪璇锋眰/绉掋€佽姹傚欢杩熴€佽姹傚け璐ャ€佺啍鏂簨浠躲€佸垎甯冨紡璺熻釜绛夈€?/span>
鏈嶅姟鍒版湇鍔¢€熺巼闄愬埗锛岄厤棰濇墽琛岀瓑銆?/span>
绮炬槑鐨勮鑰呬細璁よ瘑鍒帮紝API 缃戝叧鍜屾湇鍔$綉鏍煎湪鍔熻兘涓婁技涔庢湁鎵€閲嶅彔銆傛湇鍔$綉鏍肩殑鐩殑鏄€氳繃鍦?L7 閫忔槑鍦拌В鍐虫墍鏈夋湇鍔?搴旂敤绋嬪簭鐨勮繖浜涢棶棰樸€?br>
鎹㈠彞璇濊锛屾湇鍔$綉鏍煎笇鏈涜瀺鍚堝埌鏈嶅姟涓紙瀹為檯涓婂畠鐨勪唬鐮佸苟娌℃湁宓屽叆鍒版湇鍔′腑锛夈€?br>
鍙︿竴鏂归潰锛孉PI 缃戝叧浣嶄簬鏈嶅姟缃戞牸涔嬩笂锛屽拰搴旂敤绋嬪簭涓€璧凤紙L8锛燂級銆傛湇鍔$綉鏍间负鏈嶅姟銆佷富鏈恒€佺鍙c€佸崗璁瓑锛堜笢瑗垮悜娴侀噺锛変箣闂寸殑璇锋眰娴佸甫鏉ヤ簡浠峰€笺€?br>
瀹冧滑杩樺彲浠ユ彁渚涘熀鏈殑闆嗙兢鍏ュ彛鍔熻兘锛屼互灏嗘煇浜涙鍔熻兘寮曞叆鍗楀寳鍚戙€備絾鏄紝杩欎笉搴斾笌 API 缃戝叧鍙互甯︽潵鍖?鍗楁祦閲忕殑鍔熻兘鐩告贩娣嗐€傦紙涓€涓湪闆嗙兢鐨勫崡鍖楀悜鍜屼竴涓槸鍦ㄤ竴缁勫簲鐢ㄧ▼搴忕殑鍗楀寳鍚戯級
鏈嶅姟缃戞牸鍜?API 缃戝叧鍦ㄦ煇浜涙柟闈㈠湪鍔熻兘涓婇噸鍙狅紝浣嗘槸鍦ㄥ畠浠湪涓嶅悓灞傞潰浜掕ˉ锛屽垎鍒礋璐hВ鍐充笉鍚岀殑闂銆?br>
鐞嗘兂鐨勮В鍐虫柟妗堟槸灏嗘瘡涓粍浠讹紙API 绠$悊銆丄PI 缃戝叧銆佹湇鍔$綉鏍硷級鍚堥€傜殑瀹夌疆鍒版偍鐨勮В鍐虫柟妗堜腑锛屽苟鏍规嵁闇€瑕佸湪鍚勭粍浠堕棿寤虹珛鑹ソ鐨勮竟鐣岋紙鎴栧湪涓嶉渶瑕佹椂鎺掗櫎瀹冧滑锛夈€?br>
鍚屾牱閲嶈鐨勬槸鎵惧埌閫傚悎鐨勫姙娉曞幓鍒嗗竷寮忕殑澶勭悊杩欎簺缁勪欢锛岀粰鍒扮浉搴旂殑寮€鍙戜汉鍛樺拰杩愯惀宸ヤ綔娴併€?br>
缂栬緫锛氶櫠瀹堕緳
鍑哄锛歫ianshu.com/p/9fab0982c6bb
鍘熸枃锛歨ttps://medium.com/solo-io/api-gateways-are-going-through-an-identity-crisis-d1d833a313d7
绮惧僵鏂囩珷鎺ㄨ崘锛?/strong>
以上是关于的主要内容,如果未能解决你的问题,请参考以下文章