Why doesn't the package support multiple NameFormat attributes for the <saml:Attribute> element?
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- php
調査の方向性
SAML2\Assertion クラスから始め、setAttributeNameFormat と、issue に示されている連想配列による attribute statement の処理を調べてください。生成された XML を要求された 3 つの Attribute 要素と比較し、各 statement が独自の NameFormat を保持できることを completion でどのように検証するかを検討してください。
索引モデルが issue の本文から書いたものです。
説明
Description of the problem
I came across this situation today where I need to be able allow users to add multiple Attribute Statements to their custom SAML integration with our IDP. For each additional attribute statement, I need to allow the user to be able to set the following:
- Name (that will be the
Nameattribute) - NameFormat (That will be the
NameFormatattribute) - Value (That will be the value that goes in to the
<saml:AttributeValue>element)
When I took a look at how I could construct the SAMLResponse message for the user's custom SAML integration, I could see no (at least apparent) way to be able to set the NameFormat INDIVIDUALLY on each user defined Attribute Statement.
I see a setter method on the SAML2\Assertion class that looks like this
$this->assertion->setAttributeNameFormat('');
But that method clearly says that it will set the NameFormat for ALL attribute statements. (Those that are all set via an associative array at once). This is not the desired functionality. I dug out the following code block from the SAML2\Assertion class which confirms it. Take a look at this screenshot.
It clearly sets the same NameFormat inside the foreach loop for all statements.
Desired result (solution)
Take a look at the following XML that was generated via a tool which shows the output that I also want.
<saml2:AttributeStatement>
<saml2:Attribute Name="first" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml2:AttributeValue
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">value1
</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="second" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml2:AttributeValue
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">value2
</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="third" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml2:AttributeValue
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">value3
</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
As you can see, the NameFormats for all 3 statements are different. How could I achieve this desired XML output (SAMLResponse message) ? Any help will be greatly appreciated.
- 主要言語
- PHP
- スター
- 306
- フォーク
- 138
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
simplesamlphp/saml2 のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
simplesamlphp/saml2#408 · コメント 4 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
simplesamlphp/saml2#397 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
simplesamlphp/saml2#360 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
simplesamlphp/saml2#345 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
simplesamlphp/saml2#309 · コメント 18 件 ·
simplesamlphp/saml2 の issue をすべて見る
似ている issue
-
tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
UX
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
OpenConext/OpenConext-engineblock#2122 ·
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Automattic/safe-publish#594 ·