CAFe
  • CAFe
  • Central de Ajuda - CAFe
  • Políticas do Serviço
    • Termo de privacidade do Provedor de Serviço (SP)
    • CAFe Service Provider (SP) Privacy Agreement
    • Política da Comunidade Acadêmica Federada (CAFe)
    • Politics of Federated Academic Community (CAFe)
  • Aviso - Vulnerabilidade Shibboleth SP
  • Verificação de Inicidentes
  • Lista de Clientes
  • Atributos da CAFe
  • Perguntas Frequentes
    • FAQ - CAFe
    • FAQ - Pentaho
  • Pentaho
    • Pentaho
    • Procedimentos de Instalação
      • Procedimento de importação do template de Máquina Virtual (PDI 9.0)
      • Instalação Cliente PDI - Versão 9
      • Configuração do EID-PDI
        • Apresentação da Arquitetura do EID-PDI
        • Vídeo de configuração do EID-PDI
        • Descrição do modelo de dados EID
        • Descrição dos Jobs e Transformações disponíveis no PDI/EID
        • Descrição dos parâmetros do EID/PDI 9.0
        • Logs EID PDI
      • Controle de versão Pentaho Data Integration
      • Pentaho Módulo Web
        • Relatórios Pentaho
        • Agendamento de Jobs
      • Instalação do Apache DS - Windows
      • Tutorial Básico Apache DS
      • Procedimentos de criação da VM EID PDI
  • OpenLDAP
    • Instalação do OpenLDAP com esquema brEduPerson no Ubuntu 22.04
    • Habilitando o campo do sambaNTPassword
  • IDP CAFe
    • Requisitos de Uso
    • Manual de Usuário
      • Problemas no acesso CAFe
      • Coleta/Verificação de Atributos
        • Chimarrão (Homologação)
        • CAFe (Produção)
    • Procedimentos Técnicos
      • Como alterar o atributo principal de autenticação em seu IDP
      • Gerar nova chave e certificado para o shibboleth
      • Gerar nova chave e certificado para o Apache (auto assinado)
      • Instalando um certificado web válido em um IdP
      • Critérios de consulta ao OpenLDAP para Shibboleth
      • Altera nível do log do IDP para DEBUG
      • Ajustando Atributos CPF e Data de Nascimento para ICPEdu
      • Alterando o hostname e dominio de um IdP em produção na CAFe
      • Desabilitando o serviço Fail2ban do IdP CAFe
      • Instalando certificado Let's Encrypt no IDP Shibboleth
      • Customização da mensagens de login no IDP
      • Integrando o Office 365 com Shibboleth IDP
        • Office 365 - Configuração no Shibbboleth IDP
        • Office 365 - Configuração no Microsoft Entra
      • Instalação Manual do MFA CAFe
        • Requisitos de instalação do MFA
        • Procedimento de instalação
        • Configurações importantes - CAPTCHA
        • Ambiente com Redundância
        • Operando MFA
      • Alta Disponibilidade do Serviço
  • RPilot (IDP)
    • Instalação IDP RPilot
      • Escolhendo o Produto
      • Execução da Receita
        • Solicitar Execução
        • Parâmetros de uma receita
        • Revisão das Variáveis
        • Solicitações de Execuções
      • Homologar a instalação do IDP
      • Homologar a instalação do MFA
      • Customização da logo Institucional
    • Sobre o MFA CAFe
      • Senhas descartáveis MFA
      • Códigos de Emergência MFA
  • Service Provider (SP)
    • Guia de Instalação Shibboleth SP (3.4)
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. IDP CAFe
  2. Procedimentos Técnicos
  3. Integrando o Office 365 com Shibboleth IDP

Office 365 - Configuração no Shibbboleth IDP

Durante essa etapa serão manipulados os seguintes arquivos:

  • /opt/shibboleth-idp/conf/relying-party.xml

  • /opt/shibboleth-idp/conf/saml-nameid.xml

  • /opt/shibboleth-idp/conf/attribute-resolver.xml

  • /opt/shibboleth-idp/conf/attributes/custom/ImmutableID.properties

  • /opt/shibboleth-idp/conf/attributes/custom/UserId.properties

  • /opt/shibboleth-idp/conf/metadata-providers.xml

  • /opt/shibboleth-idp/metadata/office365-md.xml

  • /opt/shibboleth-idp/conf/attribute-filter.xml

É fortemente recomendada a realização de backup do IDP antes de executar esse procedimento

No arquivo /opt/shibboleth-idp/conf/relying-party.xml, sob o item <util:list id="shibboleth.RelyingPartyOverrides">, adicione a configuração abaixo:

<bean id="Office365" parent="RelyingPartyByName" c:relyingPartyIds="urn:federation:MicrosoftOnline">
   <property name="profileConfigurations">
      <list>
         <bean parent="SAML2.SSO" p:encryptAssertions="false" p:signAssertions="true" p:signResponses="false" />
         <bean parent="SAML2.ECP" p:encryptAssertions="false" p:signAssertions="true" p:signResponses="false" p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" />
      </list>
   </property>
</bean>

Já no arquivo /opt/shibboleth-idp/conf/saml-nameid.xml, dentro do item <util:list id="shibboleth.SAML2NameIDGenerators">, adicione a configuração abaixo:

<!-- CAFe- Persistent NameID -->
<bean parent="shibboleth.SAML2PersistentGenerator">
   <property name="activationCondition">
      <bean parent="shibboleth.Conditions.NOT">
         <constructor-arg>
            <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="urn:federation:MicrosoftOnline" />
         </constructor-arg>
      </bean>
   </property>
</bean>

<!-- CAFe - Persistent NameID exclusivo para Microsoft -->
<bean parent="shibboleth.SAML2AttributeSourcedGenerator"
      p:omitQualifiers="true"
      p:format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
      p:attributeSourceIds="#{ {'ImmutableID'} }">
   <property name="activationCondition">
      <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="urn:federation:MicrosoftOnline" />
   </property>
</bean>

Para criar os atribututos que serão usados (ImmutableID e UserId), altere o arquivo /opt/shibboleth-idp/conf/attribute-resolver.xml adicionando as linhas a seguir:

<!-- CAFe - ImmutableID para Microsoft -->
<AttributeDefinition xsi:type="Simple" id="ImmutableID">
   <InputDataConnector ref="dcLDAP" attributeNames="entryUUID"/>
</AttributeDefinition>

<!-- CAFe - UserId para Microsoft -->
<AttributeDefinition scope="%{idp.scope}" xsi:type="Scoped" id="UserId">
   <InputDataConnector ref="dcLDAP" attributeNames="uid"/>
 </AttributeDefinition>

Ainda no arquivo /opt/shibboleth-idp/conf/attribute-resolver.xml, adicione o atributo entryUUID à lista de atributos retornaveis do dataconnector dcLDAP. Exemplo:

<ReturnAttributes>%{idp.authn.LDAP.returnAttributes} mail cn givenName sn brPersonCPF schacDateOfBirth entryUUID</ReturnAttributes>

O uso dos atributos entryUUID e uid é apropriado para ambientes OpenLDAP. Caso esteja utilizando outro diretório deve-se substituí-los pelos atributos correspondentes. Ex.: AD - entryUUID > objectGUID e uid > sAMAccountName.

Crie o arquivo /opt/shibboleth-idp/conf/attributes/custom/ImmutableID.properties com o seguinte conteúdo:

# Microsoft Entra ImmutableID

id=ImmutableID
transcoder=SAML2StringTranscoder
displayName.en=Microsoft Entra ImmutableID
displayName.pt-br=Microsoft Entra ImmutableID
description.en=Microsoft Entra ImmutableID
description.pt-br=Microsoft Entra ImmutableID
saml2.name=urn:oid:1.2.840.113556.1.4.2
saml1.encodeType=false

Crie o arquivo /opt/shibboleth-idp/conf/attributes/custom/UserId.properties com o seguinte conteúdo:

# Microsoft Entra User ID

id=UserId
transcoder=SAML2ScopedStringTranscoder
displayName.en=Microsoft Entra User ID
displayName.pt-br=Microsoft Entra User ID
description.en=Microsoft Entra User ID
description.pt-br=Microsoft Entra User ID
saml2.name=urn:oid:0.9.2342.19200300.100.1.1
saml1.encodeType=false

Para configurar o provedor de metadados, altere o arquivo /opt/shibboleth-idp/conf/metadata-providers.xml e adicione a configuração abaixo:

<MetadataProvider id="Office365" xsi:type="FilesystemMetadataProvider" metadataFile="%{idp.home}/metadata/microsoft-md.xml"/>

A seguir baixe o arquivo de metadados da Microsoft e armazene-o no local apropriado e remova a linha <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>.

wget https://nexus.microsoftonline-p.com/federationmetadata/saml20/federationmetadata.xml -O /opt/shibboleth-idp/metadata/microsoft-md.xml

Por fim, altere o arquivo /opt/shibboleth-idp/conf/attribute-filter.xml incluindo a política de liberação de atributos para o Microsoft Entra.

<AttributeFilterPolicy id="PolicyForMicrosoftEntra">
   <PolicyRequirementRule xsi:type="Requester" value="urn:federation:MicrosoftOnline" />
   
   <AttributeRule attributeID="UserId">
      <PermitValueRule xsi:type="ANY"/>
   </AttributeRule>
   
   <AttributeRule attributeID="ImmutableID">
      <PermitValueRule xsi:type="ANY"/>
   </AttributeRule>

</AttributeFilterPolicy>
PreviousIntegrando o Office 365 com Shibboleth IDPNextOffice 365 - Configuração no Microsoft Entra

Last updated 1 year ago

Was this helpful?