Azure AD B2C: How to reference built in claims in custom policies? - azure-ad-b2c

I am writing a custom policy for AAD B2C and need to include some built-in claims (country/region, postalcode, city, address).
I've used the starter pack and noticed that even claims like e-mail are declared in the schema on TrustFrameworkBase ClaimSchema element like the sample below, some of them references a DefaultPartnerClaimTypes element by protocol:
<ClaimsSchema>
...
<ClaimType Id="displayName">
<DisplayName>Display Name</DisplayName>
<DataType>string</DataType>
<DefaultPartnerClaimTypes>
<Protocol Name="OAuth2" PartnerClaimType="unique_name" />
<Protocol Name="OpenIdConnect" PartnerClaimType="name" />
<Protocol Name="SAML2" PartnerClaimType="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" />
</DefaultPartnerClaimTypes>
<UserHelpText>Your display name.</UserHelpText>
<UserInputType>TextBox</UserInputType>
</ClaimType>
...
<ClaimType Id="email">
<DisplayName>Email Address</DisplayName>
<DataType>string</DataType>
<DefaultPartnerClaimTypes>
<Protocol Name="OpenIdConnect" PartnerClaimType="email" />
</DefaultPartnerClaimTypes>
<Restriction>
<Pattern RegularExpression="^[a-zA-Z0-9.!#$%&'^_`{}~-]+#[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$" HelpText="Please enter a valid email address." />
</Restriction>
</ClaimType>
...
</ClaimsSchema>
These are text typed claims and the e-mail claim for instance has a regex restriction to validate email adress, my question is regarding a country/region claims for example, which in the built in claim are enumeration restricted and presented as dropdown. Is it possible to reference it from my custom policy without defining all elements and rules? Simply reference the built-in ClaimType?
Thank you

The country claim is mapped to the country property of the user object. The country property of a user object can contain any string value.
So it's up to the policy developer to determine if the country claim should be limited to a well-known list of values or not.
If so, then you must add the <Restriction /> element to the claim type.

You could copy the countryCode claim from this example.
<ClaimType Id="countryCode">
<DisplayName>Country</DisplayName>
<DataType>string</DataType>
<UserHelpText>Enter Country</UserHelpText>
<UserInputType>DropdownSingleSelect</UserInputType>
<Restriction>
<Enumeration Text="Albania(+355)" Value="AL" />
<Enumeration Text="Algeria(+213)" Value="DZ" />
<Enumeration Text="American Samoa(+1684)" Value="AS" />
<Enumeration Text="Andorra(+376)" Value="AD" />
<Enumeration Text="Angola(+244)" Value="AO" />
<Enumeration Text="Anguilla(+1264)" Value="AI" />
<Enumeration Text="Antarctica(+672)" Value="AQ" />
<Enumeration Text="Antigua and Barbuda(+1268)" Value="AG" />
<Enumeration Text="Argentina(+54)" Value="AR" />
<Enumeration Text="Armenia(+374)" Value="AM" />
<Enumeration Text="Aruba(+297)" Value="AW" />
<Enumeration Text="Australia(+61)" Value="AU" />
<Enumeration Text="Austria(+43)" Value="AT" />
<Enumeration Text="Azerbaijan(+994)" Value="AZ" />
<Enumeration Text="Bahamas(+1242)" Value="BS" />
<Enumeration Text="Bahrain(+973)" Value="BH" />
<Enumeration Text="Bangladesh(+880)" Value="BD" />
<Enumeration Text="Barbados(+1246)" Value="BB" />
<Enumeration Text="Belarus(+375)" Value="BY" />
<Enumeration Text="Belgium(+32)" Value="BE" />
<Enumeration Text="Belize(+501)" Value="BZ" />
<Enumeration Text="Benin(+229)" Value="BJ" />
<Enumeration Text="Bermuda(+1441)" Value="BM" />
<Enumeration Text="Bhutan(+975)" Value="BT" />
<Enumeration Text="Bolivia(+591)" Value="BO" />
<Enumeration Text="Bonaire, Sint Eustatius and Saba(+599)" Value="BQ" />
<Enumeration Text="Bosnia and Herzegovina(+387)" Value="BA" />
<Enumeration Text="Botswana(+267)" Value="BW" />
<Enumeration Text="Brazil(+55)" Value="BR" />
<Enumeration Text="British Virgin Islands (+1284)" Value="VG" />
<Enumeration Text="Brunei Darussalam(+673)" Value="BN" />
<Enumeration Text="Bulgaria(+359)" Value="BG" />
<Enumeration Text="Burkina Faso(+226)" Value="BF" />
<Enumeration Text="Burundi(+257)" Value="BI" />
<Enumeration Text="Cambodia(+855)" Value="KH" />
<Enumeration Text="Cameroon(+237)" Value="CM" />
<Enumeration Text="Canada(+1)" Value="CA" />
<Enumeration Text="Cape Verde(+238)" Value="CV" />
<Enumeration Text="Cayman Islands(+1345)" Value="KY" />
<Enumeration Text="Central African Republic(+236)" Value="CF" />
<Enumeration Text="Chad(+235)" Value="TD" />
<Enumeration Text="Chile(+56)" Value="CL" />
<Enumeration Text="China(+86)" Value="CN" />
<Enumeration Text="Colombia(+57)" Value="CO" />
<Enumeration Text="Comoros(+269)" Value="KM" />
<Enumeration Text="Congo(+242)" Value="CG" />
<Enumeration Text="Cook Islands(+682)" Value="CK" />
<Enumeration Text="Costa Rica(+506)" Value="CR" />
<Enumeration Text="Côte d'Ivoire(+225)" Value="CI" />
<Enumeration Text="Croatia(+385)" Value="HR" />
<Enumeration Text="Cuba(+53)" Value="CU" />
<Enumeration Text="Curaçao(+599)" Value="CZ" />
<Enumeration Text="Cyprus(+357)" Value="CW" />
<Enumeration Text="Czech Republic(+420)" Value="CZ" />
<Enumeration Text="Congo (+243)" Value="CD" />
<Enumeration Text="Denmark(+45)" Value="DK" />
<Enumeration Text="Djibouti(+253)" Value="DJ" />
<Enumeration Text="Dominica(+1767)" Value="DM" />
<Enumeration Text="Dominican Republic(+1)" Value="DO" />
<Enumeration Text="Timor-Leste(+670)" Value="TL" />
<Enumeration Text="Ecuador(+593)" Value="EC" />
<Enumeration Text="Egypt(+20)" Value="EG" />
<Enumeration Text="El Salvador(+503)" Value="SV" />
<Enumeration Text="Equatorial Guinea(+240)" Value="GQ" />
<Enumeration Text="Eritrea(+291)" Value="ER" />
<Enumeration Text="Estonia(+372)" Value="EE" />
<Enumeration Text="Ethiopia(+251)" Value="ET" />
<Enumeration Text="Falkland Islands (Malvinas)(+500)" Value="FK" />
<Enumeration Text="Faroe Islands(+298)" Value="FO" />
<Enumeration Text="Fiji(+679)" Value="FJ" />
<Enumeration Text="Finland(+358)" Value="FI" />
<Enumeration Text="France(+33)" Value="FR" />
<Enumeration Text="French Guiana(+594)" Value="GF" />
<Enumeration Text="French Polynesia(+689)" Value="PF" />
<Enumeration Text="Gabon(+241)" Value="GA" />
<Enumeration Text="Gambia(+220)" Value="GM" />
<Enumeration Text="Georgia(+995)" Value="GE" />
<Enumeration Text="Germany(+49)" Value="DE" />
<Enumeration Text="Ghana(+233)" Value="GH" />
<Enumeration Text="Gibraltar(+350)" Value="GI" />
<Enumeration Text="Greece(+30)" Value="GR" />
<Enumeration Text="Greenland(+299)" Value="GL" />
<Enumeration Text="Grenada(+1473)" Value="GD" />
<Enumeration Text="Guadeloupe(+590)" Value="GP" />
<Enumeration Text="Guam(+1671)" Value="GU" />
<Enumeration Text="Guatemala(+502)" Value="GT" />
<Enumeration Text="Guinea(+224)" Value="GN" />
<Enumeration Text="Guinea-Bissau(+245)" Value="GW" />
<Enumeration Text="Guyana(+592)" Value="GY" />
<Enumeration Text="Haiti(+509)" Value="HT" />
<Enumeration Text="Honduras(+504)" Value="HN" />
<Enumeration Text="Hong Kong(+852)" Value="HK" />
<Enumeration Text="Hungary(+36)" Value="HU" />
<Enumeration Text="Iceland(+354)" Value="IS" />
<Enumeration Text="India(+91)" Value="IN" />
<Enumeration Text="Indonesia(+62)" Value="ID" />
<Enumeration Text="Iran(+98)" Value="IR" />
<Enumeration Text="Iraq(+964)" Value="IQ" />
<Enumeration Text="Ireland(+353)" Value="IE" />
<Enumeration Text="Israel(+972)" Value="IL" />
<Enumeration Text="Italy(+39)" Value="IT" />
<Enumeration Text="Jamaica(+1)" Value="JM" />
<Enumeration Text="Japan(+81)" Value="JP" />
<Enumeration Text="Jordan(+962)" Value="JO" />
<Enumeration Text="Kazakhstan(+7)" Value="KZ" />
<Enumeration Text="Kenya(+254)" Value="KE" />
<Enumeration Text="Kiribati(+686)" Value="KI" />
<Enumeration Text="Kuwait(+965)" Value="KW" />
<Enumeration Text="Kyrgyzstan(+996)" Value="KG" />
<Enumeration Text="Lao People's Democratic Republic(+856)" Value="LA" />
<Enumeration Text="Latvia(+371)" Value="LV" />
<Enumeration Text="Lebanon(+961)" Value="LB" />
<Enumeration Text="Lesotho(+266)" Value="LS" />
<Enumeration Text="Liberia(+231)" Value="LR" />
<Enumeration Text="Libya(+218)" Value="LY" />
<Enumeration Text="Liechtenstein(+423)" Value="LI" />
<Enumeration Text="Lithuania(+370)" Value="LT" />
<Enumeration Text="Luxembourg(+352)" Value="LU" />
<Enumeration Text="Macao(+853)" Value="MO" />
<Enumeration Text="North Macedonia, Republic of (+389)" Value="MK" />
<Enumeration Text="Madagascar(+261)" Value="MG" />
<Enumeration Text="Malawi(+265)" Value="MW" />
<Enumeration Text="Malaysia(+60)" Value="MY" />
<Enumeration Text="Maldives(+960)" Value="MV" />
<Enumeration Text="Mali(+223)" Value="ML" />
<Enumeration Text="Malta(+356)" Value="MT" />
<Enumeration Text="Marshall Islands(+692)" Value="MH" />
<Enumeration Text="Martinique(+596)" Value="MQ" />
<Enumeration Text="Mauritania(+222)" Value="MR" />
<Enumeration Text="Mauritius(+230)" Value="MU" />
<Enumeration Text="Mexico(+52)" Value="MX" />
<Enumeration Text="Micronesia(+691)" Value="FM" />
<Enumeration Text="Moldova, Republic of(+373)" Value="MD" />
<Enumeration Text="Monaco(+377)" Value="MC" />
<Enumeration Text="Mongolia(+976)" Value="MN" />
<Enumeration Text="Montenegro(+382)" Value="ME" />
<Enumeration Text="Montserrat(+1664)" Value="MS" />
<Enumeration Text="Morocco(+212)" Value="MA" />
<Enumeration Text="Mozambique(+258)" Value="MZ" />
<Enumeration Text="Myanmar(+95)" Value="MM" />
<Enumeration Text="Namibia(+264)" Value="NA" />
<Enumeration Text="Nauru(+674)" Value="NR" />
<Enumeration Text="Nepal(+977)" Value="NP" />
<Enumeration Text="Netherlands(+31)" Value="NL" />
<Enumeration Text="New Caledonia(+687)" Value="NC" />
<Enumeration Text="New Zealand(+64)" Value="NZ" />
<Enumeration Text="Nicaragua(+505)" Value="NI" />
<Enumeration Text="Niger(+227)" Value="NE" />
<Enumeration Text="Nigeria(+234)" Value="NG" />
<Enumeration Text="Niue(+683)" Value="NU" />
<Enumeration Text="Korea, Democratic People's Republic of (North Korea)(+850)" Value="KP" />
<Enumeration Text="Norway(+47)" Value="NO" />
<Enumeration Text="Oman(+968)" Value="OM" />
<Enumeration Text="Pakistan(+92)" Value="PK" />
<Enumeration Text="Palau(+680)" Value="PW" />
<Enumeration Text="Palestine, State of(+970)" Value="PS" />
<Enumeration Text="Panama(+507)" Value="PA" />
<Enumeration Text="Papua New Guinea(+675)" Value="PG" />
<Enumeration Text="Paraguay(+595)" Value="PY" />
<Enumeration Text="Peru(+51)" Value="PE" />
<Enumeration Text="Philippines(+63)" Value="PH" />
<Enumeration Text="Poland(+48)" Value="PL" />
<Enumeration Text="Portugal(+351)" Value="PT" />
<Enumeration Text="Puerto Rico(+1)" Value="PR" />
<Enumeration Text="Qatar(+974)" Value="QA" />
<Enumeration Text="Réunion(+262)" Value="RE" />
<Enumeration Text="Romania(+40)" Value="RO" />
<Enumeration Text="Russian Federation(+7)" Value="RU" />
<Enumeration Text="Rwanda(+250)" Value="RW" />
<Enumeration Text="Saint Helena, Ascension and Tristan da Cunha(+290)" Value="SH" />
<Enumeration Text="Saint Kitts and Nevis(+1869)" Value="KN" />
<Enumeration Text="Saint Lucia(+1758)" Value="LC" />
<Enumeration Text="Saint Pierre and Miquelon(+508)" Value="PM" />
<Enumeration Text="Saint Vincent and the Grenadines(+1784)" Value="VC" />
<Enumeration Text="Northern Mariana Islands(CNMI)(+1670)" Value="MP" />
<Enumeration Text="Samoa(+685)" Value="WS" />
<Enumeration Text="San Marino(+378)" Value="SM" />
<Enumeration Text="Sao Tome and Principe(+239)" Value="ST" />
<Enumeration Text="Saudi Arabia(+966)" Value="SA" />
<Enumeration Text="Senegal(+221)" Value="SN" />
<Enumeration Text="Serbia(+381)" Value="RS" />
<Enumeration Text="Seychelles(+248)" Value="SC" />
<Enumeration Text="Sierra Leone(+232)" Value="SL" />
<Enumeration Text="Singapore(+65)" Value="SG" />
<Enumeration Text="Slovakia(+421)" Value="SK" />
<Enumeration Text="Slovenia(+386)" Value="SI" />
<Enumeration Text="Solomon Islands(+677)" Value="SB" />
<Enumeration Text="Somalia(+252)" Value="SO" />
<Enumeration Text="South Africa(+27)" Value="ZA" />
<Enumeration Text="Korea, Republic of(+82)" Value="KR" />
<Enumeration Text="South Sudan(+211)" Value="SS" />
<Enumeration Text="Spain(+34)" Value="ES" />
<Enumeration Text="Sri Lanka(+94)" Value="LK" />
<Enumeration Text="Sudan(+249)" Value="SD" />
<Enumeration Text="Suriname(+597)" Value="SR" />
<Enumeration Text="Swaziland(+268)" Value="SZ" />
<Enumeration Text="Sweden(+46)" Value="SE" />
<Enumeration Text="Switzerland(+41)" Value="CH" />
<Enumeration Text="Syrian Arab Republic(+963)" Value="SY" />
<Enumeration Text="Taiwan, Province of China(+886)" Value="TW" />
<Enumeration Text="Tajikistan(+992)" Value="TJ" />
<Enumeration Text="Tanzania, United Republic of(+255)" Value="TZ" />
<Enumeration Text="Thailand(+66)" Value="TH" />
<Enumeration Text="Togo(+228)" Value="TG" />
<Enumeration Text="Tokelau(+690)" Value="TK" />
<Enumeration Text="Tonga(+676)" Value="TO" />
<Enumeration Text="Trinidad and Tobago(+1868)" Value="TT" />
<Enumeration Text="Tunisia(+216)" Value="TN" />
<Enumeration Text="Turkey(+90)" Value="TR" />
<Enumeration Text="Turkmenistan(+993)" Value="TM" />
<Enumeration Text="Turks and Caicos Islands(+1649)" Value="TC" />
<Enumeration Text="Tuvalu(+688)" Value="TV" />
<Enumeration Text="Uganda(+256)" Value="UG" />
<Enumeration Text="Ukraine(+380)" Value="UA" />
<Enumeration Text="United Arab Emirates(+971)" Value="AE" />
<Enumeration Text="United Kingdom(+44)" Value="GB" />
<Enumeration Text="United States(+1)" Value="US" />
<Enumeration Text="Virgin Islands, U.S.(+1340)" Value="VI" />
<Enumeration Text="Uruguay(+598)" Value="UY" />
<Enumeration Text="Uzbekistan(+998)" Value="UZ" />
<Enumeration Text="Vanuatu(+678)" Value="VU" />
<Enumeration Text="Holy See (Vatican City State)(+379)" Value="VA" />
<Enumeration Text="Venezuela, Bolivarian Republic of(+58)" Value="VE" />
<Enumeration Text="Viet Nam(+84)" Value="VN" />
<Enumeration Text="Wallis and Futuna(+681)" Value="WF" />
<Enumeration Text="Yemen(+967)" Value="YE" />
<Enumeration Text="Zambia(+260)" Value="ZM" />
<Enumeration Text="Zimbabwe(+263)" Value="ZW" />
</Restriction>
</ClaimType>

Related

How to understand the Bluetooth Cycle Feature 32 Bit Response

I am attempting to determine which features are supported by the Cycle Power Measurement. Apparently the Cycle Power Feature has a 32 bit response that determines which features are supported.
I assume from the document below that the response would show a true/false response for each one.
However, then I get a response back I get the folllowing
[132,0,0,42]
My assumption is that this is that the 32 bit is broken down to 4 x 8 Bits in the integer array?
However, I have no idea what do from here and need some help.
Question is "How can I use the 4 integers to determine supported
features based on the XML below?"
GATTS Characteristic Document.
<?xml version="1.0" encoding="utf-8"?>
<!-- <?xml-stylesheet type="text/xsl" href="FieldBasedDisplay.xslt"?> -->
<!--Copyright 2016 Bluetooth SIG, Inc. All rights reserved.-->
<Characteristic xsi:noNamespaceSchemaLocation="http://schemas.bluetooth.org/Documents/characteristic.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Cycling Power Feature" type="org.bluetooth.characteristic.cycling_power_feature" uuid="2A65" last-modified="2016-05-03" approved="Yes">
<InformativeText>
<Summary>The CP Feature characteristic is used to report a list of features supported by the device.</Summary>
</InformativeText>
<Value>
<Field name="Cycling Power Feature">
<Requirement>Mandatory</Requirement>
<Format>32bit</Format>
<BitField>
<Bit index="0" size="1" name="Pedal Power Balance Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="1" size="1" name="Accumulated Torque Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="2" size="1" name="Wheel Revolution Data Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="3" size="1" name="Crank Revolution Data Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="4" size="1" name="Extreme Magnitudes Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="5" size="1" name="Extreme Angles Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="6" size="1" name="Top and Bottom Dead Spot Angles Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="7" size="1" name="Accumulated Energy Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="8" size="1" name="Offset Compensation Indicator Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="9" size="1" name="Offset Compensation Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="10" size="1" name="Cycling Power Measurement Characteristic Content Masking Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="11" size="1" name="Multiple Sensor Locations Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="12" size="1" name="Crank Length Adjustment Supported ">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="13" size="1" name="Chain Length Adjustment Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="14" size="1" name="Chain Weight Adjustment Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="15" size="1" name="Span Length Adjustment Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="16" size="1" name="Sensor Measurement Context">
<Enumerations>
<Enumeration key="0" value="Force based" />
<Enumeration key="1" value="Torque based" />
</Enumerations>
</Bit>
<Bit index="17" size="1" name="Instantaneous Measurement Direction Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="18" size="1" name="Factory Calibration Date Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="19" size="1" name="Enhanced Offset Compensation Supported">
<Enumerations>
<Enumeration key="0" value="False" />
<Enumeration key="1" value="True" />
</Enumerations>
</Bit>
<Bit index="20" size="2" name="Distribute System Support">
<Enumerations>
<Enumeration key="0" value="Unspecified (legacy sensor)" />
<Enumeration key="1" value="Not for use in a distributed system" />
<Enumeration key="2" value="Can be used in a distributed system" />
<Enumeration key="3" value="RFU" />
</Enumerations>
</Bit>
<ReservedForFutureUse index="22" size="10" />
</BitField>
</Field>
</Value>
<Note>
The fields in the above table, reading from top to bottom, are shown in the order of LSO to MSO, where LSO = Least Significant Octet and MSO = Most Significant Octet.
The Least Significant Octet represents the eight bits numbered 0 to 7.
</Note>
</Characteristic>
You received a response of 32 bit hex value like [2c 00 01 00]. than have to convert it to binary like 2c becomes 00101100 00 becomes 0000000 and etc in the end your binary string becomes something like [00101100 00000000 00000001 0000000] now you have to read from first 8 bits from right to left [LSB to MSB]
For easiness of reading you can reverse these 8 bits like 00101100 becomes 00110100
This shows you have WRDS (Wheel revolution data supported) CRDS (Crank Revolution data supported) and EAS (Extreme magnitudes supported).
Hope this helps you in reading flags.
another easy way of reading is convert hex string into easy format like 2c 00 01 00 becomes 00 01 00 2c and than convert it into binary and start reading from right like 00000000 00000001 00000000 00101100 start from right to left.

Unkown node in applicationHost.config of IIS. Leaving website and app pool in unstable condition

Please help us out in understanding what this node in the applicationHost.config mean:
Basically we need to know what are these property ids? I guess they are leaving the website in an unstable condition and most probably corrupting the bindings.
<customMetadata>
<key path="LM/W3SVC">
<property id="130001" dataType="String" userType="2" attributes="Inherit" value="BITS-Sessions" />
<property id="130002" dataType="String" userType="2" attributes="Inherit" value="18446744073709551615" />
<property id="130003" dataType="DWord" userType="2" attributes="Inherit" value="1209600" />
<property id="130004" dataType="DWord" userType="2" attributes="Inherit" value="0" />
<property id="130005" dataType="String" userType="2" attributes="Inherit" value="" />
<property id="130007" dataType="String" userType="2" attributes="Inherit" value="" />
<property id="130008" dataType="DWord" userType="2" attributes="Inherit" value="86400" />
<property id="130010" dataType="DWord" userType="2" attributes="Inherit" value="0" />
<property id="130011" dataType="DWord" userType="2" attributes="Inherit" value="1" />
<property id="130012" dataType="DWord" userType="2" attributes="Inherit" value="12" />
<property id="130013" dataType="DWord" userType="2" attributes="Inherit" value="1" />
<property id="130014" dataType="DWord" userType="2" attributes="Inherit" value="0" />
<property id="130015" dataType="DWord" userType="2" attributes="Inherit" value="0" />
<property id="130016" dataType="DWord" userType="2" attributes="Inherit" value="0" />
<property id="130017" dataType="DWord" userType="2" attributes="Inherit" value="50" />
<property id="130018" dataType="DWord" userType="2" attributes="Inherit" value="0" />
<property id="2073" dataType="MultiSZ" userType="1" attributes="Inherit" value="C:\windows\system32\bitssrv.dll
" />
</key>
<key path="LM/W3SVC/INFO">
<property id="4012" dataType="String" userType="1" attributes="Inherit" value="NCSA Common Log File Format,Microsoft IIS Log File Format,W3C Extended Log File Format,ODBC Logging" />
<property id="2120" dataType="MultiSZ" userType="1" attributes="None" value="400,0,,,0
" />
</key>
</customMetadata>

phonegap permissions not being asked when installing apk

This is my config.xml for phonegap with JQM
but when i install the APK after compiling with adobe build it asks me only for GPS & Audio recording. Not for camera etc. then the camera function is not available to my APP of course. any ideas?
<plugin name="cordova-plugin-geolocation" />
<plugin name="cordova-plugin-camera" />
<plugin name="cordova-plugin-file" />
<plugin name="cordova-plugin-media" />
<plugin name="cordova-plugin-media-capture" />
<plugin name="cordova-plugin-dialogs" />
<plugin name="cordova-plugin-file-transfer" />
<plugin name="cordova-plugin-whitelist" version="1" />
<preference name="permissions" value="none"/>
<preference name="stay-in-webview" value="false" />
<preference name="InAppBrowserStorageEnabled" value="true"/>
<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/geolocation"/>
<feature name="http://api.phonegap.com/1.0/media"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<feature name="http://api.phonegap.com/1.0/notification"/>
<icon src="icon.png" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
Make sure you include source="npm" at the end of your tags like so:
<plugin name="cordova-plugin-dialogs" source="npm"/>
J

Configuration not to loose messages

I have spring xd component called throttle where i store the messages and post are and throttle them and send them slowly.I am running my xd in 3 containers.I have holding delay for delayer as 0.When one container goes down.I loose messages.Below is my configuration.Looks like its not storing to postgre and loosing in memory or cache.
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:int-groovy="http://www.springframework.org/schema/integration/groovy"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:int-jdbc="http://www.springframework.org/schema/integration/jdbc"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:ehcache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/integration/jdbc
http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd
http://www.springframework.org/schema/integration/groovy
http://www.springframework.org/schema/integration/groovy/spring-integration-groovy.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-4.1.xsd">
<ehcache:annotation-driven cache-manager="cacheManager" />
<context:property-placeholder
location="classpath*:dms-security-${region}.properties, classpath*:dms-jms-${region}.properties, classpath*:dms-mongo-${region}.properties" />
<context:component-scan base-package="com.testhrottle.api.dms.*"
use-default-filters="false">
<context:include-filter type="annotation"
expression="org.springframework.context.annotation.Configuration" />
</context:component-scan>
<channel id="input">
<!-- <interceptors>
<ref bean="messageInterceptor" />
</interceptors> -->
</channel>
<channel id="output" />
<channel id="sms" />
<channel id="eml" />
<channel id="del" />
<!-- <header-value-router input-channel="input" header-name="Channel-Type" >
<mapping value="PHN" channel="sms" />
<mapping value="EML" channel="eml" />
<mapping value="DEL" channel="del" />
</header-value-router> -->
<router input-channel="input">
<beans:bean name="messageRouter" class="com.testhrottle.xd.util.MessageRouter">
<beans:property name="cache" ref="configCache" />
</beans:bean>
</router>
<service-activator input-channel="del" ref="delete" method="delete"/>
<filter input-channel="eml" output-channel="output">
<beans:bean class="com.testhrottle.xd.throttle.Throttle">
<beans:constructor-arg value="${tpsThreshold}" />
<beans:constructor-arg value="${spanSeconds}" />
<beans:property name="cache" ref="configCache" />
<beans:property name="dailyLimitCounter" ref="dailyLimitCounter" />
<beans:property name="errorPublishing" ref="errorPublishing" />
</beans:bean>
</filter>
<filter input-channel="sms" output-channel="output">
<beans:bean class="com.testhrottle.xd.throttle.SmsThrottle">
<beans:constructor-arg value="${smsTpsThreshold}" />
<beans:constructor-arg value="${smsSpanSeconds}" />
<beans:property name="cache" ref="configCache" />
<beans:property name="dailyLimitCounter" ref="dailyLimitCounter" />
<beans:property name="errorPublishing" ref="errorPublishing" />
</beans:bean>
</filter>
<channel id="requeue">
<dispatcher task-executor="taskExecutor" />
</channel>
<task:executor id="taskExecutor" pool-size="1" />
<delayer id="delayer" input-channel="requeue" default-delay="${holdingDelay}"
expression="headers['delay']" message-store="messageStore"
output-channel="input" />
<!-- <int-jdbc:message-store id="messageStore" data-source="dataSource" /> -->
<beans:bean id="messageStore" class="com.testhrottle.xd.util.CustomJdbcMessageStore">
<beans:constructor-arg ref="dataSource"/>
</beans:bean>
<!-- <beans:bean name="messageInterceptor" class="com.testhrottle.xd.util.MessageInterceptor">
<beans:property name="cache" ref="configCache" />
</beans:bean> -->
<beans:bean name="configCache"
class="com.testhrottle.xd.cache.ConfigCache">
<beans:property name="jdbcTemplate" ref="jdbcTemplate" />
<beans:property name="holdRetryIntervelInSeconds" value="${holdRetryIntervelInSeconds}" />
<beans:property name="configQuery" value="select alrt_type_cd alertType,dlvry_days_of_week daysOfWeek,DLVRY_STRT_TM startTime,DLVRY_END_TM endTime,DLVRY_STRT_DT startDate,DLVRY_END_DT endDate,hold_ind holdFlag, max_msgs_per_day maxMsgPerDay,purge_ind purge from ${schema}.alrt_type where alrt_type_cd = ?" />
</beans:bean>
<beans:bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<beans:property name="driverClassName" value="org.postgresql.Driver"/>
<beans:property name="url" value="${dbURL}"/>
<beans:property name="username" value="${userName}"/>
<beans:property name="password" value="#{encryptedDatum.decryptBase64Encoded('${passWord}')}"/>
</beans:bean>
<beans:bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<beans:property name="dataSource">
<beans:ref bean="dataSource" />
</beans:property>
</beans:bean>
<beans:bean id="encryptedDatum" class="com.testhrottle.api.dms.core.security.EncryptedSecuredDatum"/>
<!-- <beans:bean id="rabbitTemplate" class="org.springframework.amqp.rabbit.core.RabbitTemplate"/> -->
<beans:bean id="errorPublishing" class="com.testhrottle.xd.util.ErrorPublishing">
<!-- <beans:property name="rabbitTemplate" ref="rabbitTemplate" /> -->
</beans:bean>
<beans:bean id="delete" class="com.testhrottle.xd.util.Delete"/>
<!--
<beans:bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<beans:property name="driverClassName" value="org.postgresql.Driver"/>
<beans:property name="url" value="jdbc:postgresql://localhost:5432/postgres"/>
<beans:property name="username" value="postgres"/>
<beans:property name="password" value="postgres"/>
</beans:bean>
<beans:bean name="configCache"
class="com.testhrottle.xd.cache.ConfigCache">
<beans:property name="jdbcTemplate" ref="jdbcTemplate" />
<beans:property name="holdRetryIntervelInSeconds" value="10" />
<beans:property name="configQuery" value="select alrt_type_cd alertType,dlvry_days_of_week daysOfWeek,DLVRY_STRT_TM startTime,DLVRY_END_TM endTime,DLVRY_STRT_DT startDate,DLVRY_END_DT endDate,hold_ind holdFlag, max_msgs_per_day maxMsgPerDay from dms_wb.alrt_type where alrt_type_cd = ?;
" />
</beans:bean>
<beans:bean name="cacheTest"
class="com.testhrottle.xd.cache.CacheTest">
<beans:property name="cache" ref="configCache" />
</beans:bean> -->
<beans:bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>
<beans:bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager">
<beans:property name="cacheManager" ref="ehcache" />
</beans:bean>
<beans:bean id="ehcache"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<beans:property name="configLocation" value="classpath:ehcache.xml" />
<beans:property name="shared" value="true" />
</beans:bean>
<beans:bean name="dailyLimitCounter" class="com.testhrottle.xd.throttle.DailyLimitCounter"/>
<task:scheduler id="taskSchedulerInbound" pool-size="10" />
<task:scheduled-tasks>
<task:scheduled ref="dailyLimitCounter" method="clearAlertDailyCount" cron="59 59 23 * * *" />
</task:scheduled-tasks>
</beans:beans>
so if i remove this it should work in same thread.
<channel id="requeue">
<dispatcher task-executor="taskExecutor" />
</channel>
<task:executor id="taskExecutor" pool-size="1" />
Looks like your <dispatcher task-executor="taskExecutor" /> is guilty.
Since you jump out of the Message Bus thread, that acks (commits) the message on the Broker, but the crash of the node doesn't effect that already (rallback), because your message has been moved to different thread. And there it hasn't reached your DB to be commited there, too.
In general it would be better to do everything in the Spring XD withing container's (XD) threads and rely on the Message Bus persistent mechanism.
Or commit messages to DB manually, but in the same XD thread.
Makes sense?

Mobicents diameter no connection to peer error message

I am new to mobicents diameter and followed the example downloaded here.
Executing both ExampleClient and ExampleServer on the same machine with different ports the "Result-code" is 3002
"Error-message" is "No connection to peer"
Where am I wrong?
Protocol error:
DIAMETER_UNABLE_TO_DELIVER 3002
This error is given when Diameter can not deliver the message to
the destination, either because no host within the realm
supporting the required application was available to process the
request, or because Destination-Host AVP was given without the
associated Destination-Realm AVP.
client-jdiameter-config.xml
<?xml version="1.0"?>
<Configuration xmlns="http://www.jdiameter.org/jdiameter-server">
<LocalPeer>
<URI value="aaa://127.0.0.1:1812" />
<IPAddresses>
<IPAddress value="127.0.0.1" />
</IPAddresses>
<Realm value="mobicents.org" />
<VendorID value="0" />
<ProductName value="jDiameter" />
<FirmwareRevision value="1" />
<OverloadMonitor>
<Entry index="1" lowThreshold="0.5" highThreshold="0.6">
<ApplicationID>
<VendorId value="0" />
<AuthApplId value="333333" />
<AcctApplId value="0" />
</ApplicationID>
</Entry>
</OverloadMonitor>
</LocalPeer>
<Parameters>
<AcceptUndefinedPeer value="false" />
<DuplicateProtection value="true" />
<DuplicateTimer value="240000" />
<UseUriAsFqdn value="false" />
<QueueSize value="10000" />
<MessageTimeOut value="60000" />
<StopTimeOut value="10000" />
<CeaTimeOut value="10000" />
<IacTimeOut value="30000" />
<DwaTimeOut value="10000" />
<DpaTimeOut value="5000" />
<RecTimeOut value="10000" />
<Concurrent>
<Entity name="ThreadGroup" size="64" />
<Entity name="ProcessingMessageTimer" size="1" />
<Entity name="DuplicationMessageTimer" size="1" />
<Entity name="RedirectMessageTimer" size="1" />
<Entity name="PeerOverloadTimer" size="1" />
<Entity name="ConnectionTimer" size="1" />
<Entity name="StatisticTimer" size="1" />
</Concurrent>
</Parameters>
<Network>
<Peers>
<Peer name="aaa://127.0.0.1:3868" attempt_connect="true" rating="1" />
</Peers>
<Realms>
<Realm name="mobicents.org" peers="127.0.0.1"
local_action="LOCAL" dynamic="false" exp_time="1">
<ApplicationID>
<VendorId value="0" />
<AuthApplId value="333333" />
<AcctApplId value="0" />
</ApplicationID>
</Realm>
</Realms>
</Network>
<Extensions />
</Configuration>
server-jdiameter-config.xml
<?xml version="1.0"?>
<Configuration xmlns="http://www.jdiameter.org/jdiameter-server">
<LocalPeer>
<URI value="aaa://127.0.0.1:3868" />
<IPAddresses>
<IPAddress value="127.0.0.1" />
</IPAddresses>
<Realm value="mobicents.org" />
<VendorID value="0" />
<ProductName value="jDiameter" />
<FirmwareRevision value="1" />
<OverloadMonitor>
<Entry index="1" lowThreshold="0.5" highThreshold="0.6">
<ApplicationID>
<VendorId value="0" />
<AuthApplId value="333333" />
<AcctApplId value="0" />
</ApplicationID>
</Entry>
</OverloadMonitor>
</LocalPeer>
<Parameters>
<!-- set to true, we can safely remove client def in this case -->
<AcceptUndefinedPeer value="true" />
<DuplicateProtection value="true" />
<DuplicateTimer value="240000" />
<UseUriAsFqdn value="false" />
<QueueSize value="10000" />
<MessageTimeOut value="60000" />
<StopTimeOut value="10000" />
<CeaTimeOut value="10000" />
<IacTimeOut value="30000" />
<DwaTimeOut value="10000" />
<DpaTimeOut value="5000" />
<RecTimeOut value="10000" />
<Concurrent>
<Entity name="ThreadGroup" size="64" />
<Entity name="ProcessingMessageTimer" size="1" />
<Entity name="DuplicationMessageTimer" size="1" />
<Entity name="RedirectMessageTimer" size="1" />
<Entity name="PeerOverloadTimer" size="1" />
<Entity name="ConnectionTimer" size="1" />
<Entity name="StatisticTimer" size="1" />
</Concurrent>
</Parameters>
<Network>
<Peers>
<!-- our client, lets define it -->
<Peer name="aaa://127.0.0.1:1812" attempt_connect="false"
rating="1" />
</Peers>
<Realms>
<Realm name="mobicents.org" peers="127.0.0.1" local_action="LOCAL" dynamic="false" exp_time="1">
<ApplicationID>
<VendorId value="0" />
<AuthApplId value="333333" />
<AcctApplId value="0" />
</ApplicationID>
</Realm>
</Realms>
</Network>
<Extensions />
</Configuration>

Resources